revival/game/Assets/Scripts/Player/PlayerAnimationController.cs

16 lines
399 B
C#

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerAnimationController : MonoBehaviour
{
[SerializeField] private Animator _animator;
[SerializeField] private CharacterController _controller;
private void Update()
{
_animator.SetBool("Is Walking", _controller.velocity.magnitude > 0.01f);
}
}