사망 시 이동, 액션, 인터랙션 금지

This commit is contained in:
2026-02-25 15:29:21 +09:00
parent 17b3cf6746
commit 4804e78951
3 changed files with 18 additions and 0 deletions

View File

@@ -341,6 +341,12 @@ public class NetworkPlayerController : NetworkBehaviour, ITeamMember, IDamageabl
[ClientRpc]
private void HidePlayerClientRpc()
{
// 로컬 플레이어만 입력 비활성화
if (IsLocalPlayer && _inputActions != null)
{
_inputActions.Disable();
}
// CharacterController 비활성화 (이동 및 충돌 방지)
if (_controller != null)
{
@@ -361,6 +367,12 @@ public class NetworkPlayerController : NetworkBehaviour, ITeamMember, IDamageabl
[ClientRpc]
private void ShowPlayerClientRpc()
{
// 로컬 플레이어만 입력 활성화
if (IsLocalPlayer && _inputActions != null)
{
_inputActions.Enable();
}
// CharacterController 활성화
if (_controller != null)
{

View File

@@ -90,6 +90,9 @@ namespace Northbound
// UI가 열려있으면 액션 실행 안 함
if (UpgradeListPopup.IsOpen) return;
// 플레이어가 죽어있으면 액션 실행 안 함
if (_networkPlayerController != null && _networkPlayerController.IsDead()) return;
ExecuteAction("Attack");
}

View File

@@ -179,6 +179,9 @@ namespace Northbound
private void OnInteract(InputAction.CallbackContext context)
{
// 플레이어가 죽어있으면 상호작용 불가
if (_networkPlayerController != null && _networkPlayerController.IsDead()) return;
if (blockDuringAnimation && _isInteracting)
return;