DEG-111 [Style] 코드 위치 조정 등

This commit is contained in:
Jay 2025-04-25 17:39:33 +09:00
parent 470d7a2932
commit 659cca6770
3 changed files with 7 additions and 8 deletions

View File

@ -28,12 +28,11 @@ public class PlayerActionAttack : IPlayerAction {
public void EndAction() { public void EndAction() {
player.PlayerAnimator.SetBool(Attack, false); player.PlayerAnimator.SetBool(Attack, false);
IsActive = false; IsActive = false;
player.OnActionEnded(this); player.OnActionEnded(this); // player 에서도 action 초기화
player = null; player = null;
} }
public void EnableCombo() { public void EnableCombo() {
if (comboStep > 4) return; // 마지막 공격일 땐 콤보 허용 X
canReceiveCombo = true; canReceiveCombo = true;
} }

View File

@ -51,7 +51,7 @@ public class PlayerActionDash : IPlayerAction
public void EndAction() public void EndAction()
{ {
IsActive = false; IsActive = false;
player.OnActionEnded(this); player.OnActionEnded(this); // player 에서도 action 초기화
player = null; player = null;
} }
} }

View File

@ -156,6 +156,11 @@ public class PlayerController : CharacterBase, IObserver<GameObject>
_actionDash.StartAction(this); _actionDash.StartAction(this);
} }
public void OnActionEnded(IPlayerAction action)
{
if (_currentAction == action) _currentAction = null;
}
#endregion #endregion
#region #region
@ -185,11 +190,6 @@ public class PlayerController : CharacterBase, IObserver<GameObject>
} }
} }
public void OnActionEnded(IPlayerAction action)
{
if (_currentAction == action) _currentAction = null;
}
#endregion #endregion
#region #region