camera_system #5
@ -13,6 +13,21 @@ private void Awake()
|
|||||||
_spineController = GetComponent<SpineController>();
|
_spineController = GetComponent<SpineController>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
_restaurantPlayerMovement.OnMoving += OnMove;
|
||||||
|
_restaurantPlayerMovement.OnDashing += OnDash;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnDestroy()
|
||||||
|
{
|
||||||
|
if (_restaurantPlayerMovement)
|
||||||
|
{
|
||||||
|
_restaurantPlayerMovement.OnMoving -= OnMove;
|
||||||
|
_restaurantPlayerMovement.OnDashing -= OnDash;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void OnMove(bool isMoving)
|
private void OnMove(bool isMoving)
|
||||||
{
|
{
|
||||||
string animationName = isMoving ? RestaurantPlayerAnimation.Walk : RestaurantPlayerAnimation.Idle;
|
string animationName = isMoving ? RestaurantPlayerAnimation.Walk : RestaurantPlayerAnimation.Idle;
|
||||||
|
Loading…
Reference in New Issue
Block a user