Added wall states
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user