public void UpdateAnimation(Player.MoveAnim animation) { playerMoveAnim = animation; switch(animation) { case Player.MoveAnim.Idle: anim.SetBool("isMoving", false); break; case Player.MoveAnim.Walking: anim.SetBool("isMoving", true); break; } }
void Awake() { anim = this.GetComponent<Animator>(); playerMoveAnim = this.GetComponent<Player>().MoveAnimation; }