21 lines
377 B
C#
21 lines
377 B
C#
using UnityEngine;
|
|
|
|
public class PlayerAnimator : MonoBehaviour
|
|
{
|
|
|
|
private const string IS_WALKING = "IsWalking";
|
|
|
|
[SerializeField] private Player player;
|
|
private Animator animator;
|
|
|
|
private void Awake()
|
|
{
|
|
animator = GetComponent<Animator>();
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
animator.SetBool(IS_WALKING, player.IsWalking());
|
|
}
|
|
|
|
}
|