From a486a2ed83ebdb48f6aec1fd11d4d5df70bac72c Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sat, 25 Feb 2023 17:32:20 +0100 Subject: [PATCH] fix shadow variable --- Characters/Villain.gd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Characters/Villain.gd b/Characters/Villain.gd index 7becb84..3561fb2 100755 --- a/Characters/Villain.gd +++ b/Characters/Villain.gd @@ -29,13 +29,13 @@ func _process(delta): var current_anim_idx = animations.find(me.animation) if current_anim_idx >= animations.size() - 1: # Last animation reached - check_next_animframe(me, max_frame, animations[0]) + check_next_animframe(max_frame, animations[0]) else: - check_next_animframe(me, max_frame, animations[current_anim_idx + 1]) + check_next_animframe(max_frame, animations[current_anim_idx + 1]) # Jump to next animation at the end of the current one -func check_next_animframe(me, max_frame, next_animation): +func check_next_animframe(max_frame, next_animation): if me.frame == 0 and next: me.play(next_animation) next = false