Fixed animation signals

This commit is contained in:
2026-01-11 17:25:29 +03:00
parent 5314aac33a
commit ff31781087
4 changed files with 29 additions and 23 deletions
+4 -4
View File
@@ -167,6 +167,10 @@ func _rearrange_pickups() -> void:
node.position.y = 0
func _play_look_around_animation() -> void:
sprite.play(ANIMATION_LOOK_AROUND_1 if randi_range(1, 2) == 1 else ANIMATION_LOOK_AROUND_2)
func _on_animation_finished() -> void:
match sprite.animation:
ANIMATION_LOOK_AROUND_1, ANIMATION_LOOK_AROUND_2:
@@ -181,7 +185,3 @@ func _on_animation_looped() -> void:
ANIMATION_IDLE:
if randi_range(1, 100) <= LOOK_AROUND_CHANCE:
_play_look_around_animation()
func _play_look_around_animation() -> void:
sprite.play(ANIMATION_LOOK_AROUND_1 if randi_range(1, 2) == 1 else ANIMATION_LOOK_AROUND_2)