player walk animation

This commit is contained in:
2023-06-29 14:51:46 +03:00
parent e8b52c1062
commit bdb4bfd3c3
4 changed files with 68 additions and 11 deletions
+6
View File
@@ -87,4 +87,10 @@ public class Player : Character
_hammer.transform.localScale = new Vector2(_hammer.transform.localScale.x * (_facingRight ? 1 : -1), _hammer.transform.localScale.y);
_hammer.GetComponent<Rigidbody2D>().velocity = new Vector2(gameObject.transform.localScale.x * _hammerSpeed, 0);
}
protected override void SetWalkingAnimation(bool isWalking)
{
_animator.SetBool("Legs_Walk",isWalking);
_animator.SetBool("Body_Walk", isWalking);
}
}