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() {
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;
}

View File

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

View File

@ -155,6 +155,11 @@ public class PlayerController : CharacterBase, IObserver<GameObject>
_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<GameObject>
}
}
public void OnActionEnded(IPlayerAction action)
{
if (_currentAction == action) _currentAction = null;
}
#endregion
#region