using UnityEngine; namespace DDD { public class RestaurantCharacterAnimation : MonoBehaviour { private RestaurantPlayerMovement _restaurantPlayerMovement; private SpineController _spineController; private void Awake() { _restaurantPlayerMovement = GetComponent(); _spineController = GetComponent(); } private void OnMove(bool isMoving) { string animationName = isMoving ? RestaurantPlayerAnimation.Walk : RestaurantPlayerAnimation.Idle; _spineController.PlayAnimation(animationName, true); } private void OnDash(float dashTime) { _spineController.PlayAnimationDuration(RestaurantPlayerAnimation.Dash, false, duration:dashTime); } } }