4.6, new attack, enemy spawning, shaders, bunch of stuff

This commit is contained in:
Daniel Kauss Serna 2026-02-17 01:24:05 +01:00
parent e08e3ebb13
commit 19517a3176
84 changed files with 13348 additions and 91399 deletions

View file

@ -7,6 +7,7 @@ signal died
@export var max_health: int = 3
@export var move_speed: float = 50.0
@export var friction: float = 0.7
@export var main_visual : Node2D
@export var death_scene : PackedScene
@onready var health: int = max_health
@ -24,6 +25,7 @@ func damage(amount: int = 1) -> void:
health_changed.emit(health)
_play_hit_flash()
EventBus.screenshake.emit(5)
if health <= 0:
die()
@ -36,15 +38,18 @@ func die():
died.emit()
func _apply_movement(_delta: float) -> void:
func _apply_movement() -> void:
velocity *= friction
move_and_slide()
func _process(delta: float) -> void:
mask_use_cd -= delta
func _physics_process(delta: float) -> void:
mask_use_cd -= delta
_apply_movement(delta)
move_and_slide()
_apply_movement()
func _play_hit_flash():
var tween = create_tween()
tween.tween_property(self, "modulate", Color.CRIMSON, 0.1)
tween.tween_property(self, "modulate", Color.WHITE, 0.3)
if main_visual:
tween.tween_property(main_visual, "modulate", Color.CRIMSON, 0.1)
tween.tween_property(main_visual, "modulate", Color.WHITE, 0.3)