From c66c9a201ecaa0a66fb57e1066c86de529501023 Mon Sep 17 00:00:00 2001 From: NTG_Lenovo Date: Mon, 14 Jul 2025 15:37:43 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A0=88=EC=8A=A4=ED=86=A0=EB=9E=91=20?= =?UTF-8?q?=ED=94=8C=EB=A0=88=EC=9D=B4=EC=96=B4=20=EC=95=A0=EB=8B=88?= =?UTF-8?q?=EB=A9=94=EC=9D=B4=EC=85=98=20=EC=9D=B4=EB=B2=A4=ED=8A=B8=20?= =?UTF-8?q?=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RestaurantCharacterAnimation.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/RestaurantCharacterAnimation.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/RestaurantCharacterAnimation.cs index f8f27f851..b2dd01dc4 100644 --- a/Assets/_DDD/_Scripts/RestaurantCharacter/RestaurantCharacterAnimation.cs +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/RestaurantCharacterAnimation.cs @@ -13,6 +13,21 @@ private void Awake() _spineController = GetComponent(); } + 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;