레스토랑 플레이어 애니메이션 이벤트 연결
This commit is contained in:
parent
97cf6c1b53
commit
c66c9a201e
@ -13,6 +13,21 @@ private void Awake()
|
||||
_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)
|
||||
{
|
||||
string animationName = isMoving ? RestaurantPlayerAnimation.Walk : RestaurantPlayerAnimation.Idle;
|
||||
|
Loading…
Reference in New Issue
Block a user