Finish my animations

This commit is contained in:
BuyMyMojo 2023-02-26 02:09:56 +11:00
parent 7c0c6eda6a
commit 0859e4b36c
12 changed files with 156 additions and 23 deletions

View file

@ -0,0 +1,23 @@
using System.Collections;
using System.Collections.Generic;
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());
}
}