diff --git a/Assets/JAY/Scripts/IPlayerAction/PlayerActionAttack.cs b/Assets/JAY/Scripts/IPlayerAction/PlayerActionAttack.cs index 225e1cc7..6c456de0 100644 --- a/Assets/JAY/Scripts/IPlayerAction/PlayerActionAttack.cs +++ b/Assets/JAY/Scripts/IPlayerAction/PlayerActionAttack.cs @@ -28,12 +28,11 @@ public class PlayerActionAttack : IPlayerAction { public void EndAction() { player.PlayerAnimator.SetBool(Attack, false); IsActive = false; - player.OnActionEnded(this); + player.OnActionEnded(this); // player 에서도 action 초기화 player = null; } public void EnableCombo() { - if (comboStep > 4) return; // 마지막 공격일 땐 콤보 허용 X canReceiveCombo = true; } diff --git a/Assets/JAY/Scripts/IPlayerAction/PlayerActionDash.cs b/Assets/JAY/Scripts/IPlayerAction/PlayerActionDash.cs index a0713ed5..c7e625a3 100644 --- a/Assets/JAY/Scripts/IPlayerAction/PlayerActionDash.cs +++ b/Assets/JAY/Scripts/IPlayerAction/PlayerActionDash.cs @@ -51,7 +51,7 @@ public class PlayerActionDash : IPlayerAction public void EndAction() { IsActive = false; - player.OnActionEnded(this); + player.OnActionEnded(this); // player 에서도 action 초기화 player = null; } } diff --git a/Assets/JAY/Scripts/PlayerController.cs b/Assets/JAY/Scripts/PlayerController.cs index 60153284..c490bc81 100644 --- a/Assets/JAY/Scripts/PlayerController.cs +++ b/Assets/JAY/Scripts/PlayerController.cs @@ -155,6 +155,11 @@ public class PlayerController : CharacterBase, IObserver _currentAction = _actionDash; _actionDash.StartAction(this); } + + public void OnActionEnded(IPlayerAction action) + { + if (_currentAction == action) _currentAction = null; + } #endregion @@ -185,11 +190,6 @@ public class PlayerController : CharacterBase, IObserver } } - public void OnActionEnded(IPlayerAction action) - { - if (_currentAction == action) _currentAction = null; - } - #endregion #region 대시 관련