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

16 lines
399 B
C#
Raw Normal View History

2021-03-05 19:00:50 +01:00
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);
}
}