Added wall states

This commit is contained in:
2026-06-28 19:59:18 +03:00
parent 204546b93a
commit 84ab412658
8 changed files with 136 additions and 6 deletions
+4 -1
View File
@@ -44,6 +44,9 @@ var _last_wall_normal: = 0.0
@onready var wall_attach_timer : Timer = $WallAttachTimer
@onready var attack_cooldown_timer : Timer = $AttackCooldownTimer
@onready var wall_left_particles : GPUParticles2D = $WallLeftParticles
@onready var wall_right_particles : GPUParticles2D = $WallRightParticles
@onready var _max_speed := move_max_speed_normal
@@ -117,7 +120,7 @@ func _physics_process(delta: float) -> void:
func _input(event: InputEvent) -> void:
if event.is_action_pressed("attack"):
if not _slow_down_tween or not _slow_down_tween.is_running():
if not is_on_floor() or not is_zero_approx(velocity.x):
if not is_on_wall() and not is_on_floor() or not is_zero_approx(velocity.x):
_attack()