Skip to content

Commit 9e43452

Browse files
Fix Galoomba animation bug
1 parent 5881d92 commit 9e43452

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

Assets/HelloMarioFramework/Script/Enemy/Enemy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class Enemy : Stompable
3232
private int collisionCount = 0;
3333

3434
//Animator hash values
35-
private static int chaseHash = Animator.StringToHash("Chase");
35+
protected static int chaseHash = Animator.StringToHash("Chase");
3636
private static int stompHash = Animator.StringToHash("Stomp");
3737
private static int speedHash = Animator.StringToHash("Speed");
3838
private static int groundHash = Animator.StringToHash("onGround");

Assets/HelloMarioFramework/Script/Enemy/Galoomba.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ private IEnumerator UnFlip()
5151
flipped = false;
5252
yield return new WaitForSeconds(1f);
5353
cooldown = false;
54+
animator.SetBool(chaseHash, false);
5455
}
5556

5657
}

0 commit comments

Comments
 (0)