사망 시 이동, 액션, 인터랙션 금지
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -90,6 +90,9 @@ namespace Northbound
|
||||
// UI가 열려있으면 액션 실행 안 함
|
||||
if (UpgradeListPopup.IsOpen) return;
|
||||
|
||||
// 플레이어가 죽어있으면 액션 실행 안 함
|
||||
if (_networkPlayerController != null && _networkPlayerController.IsDead()) return;
|
||||
|
||||
ExecuteAction("Attack");
|
||||
}
|
||||
|
||||
|
||||
@@ -179,6 +179,9 @@ namespace Northbound
|
||||
|
||||
private void OnInteract(InputAction.CallbackContext context)
|
||||
{
|
||||
// 플레이어가 죽어있으면 상호작용 불가
|
||||
if (_networkPlayerController != null && _networkPlayerController.IsDead()) return;
|
||||
|
||||
if (blockDuringAnimation && _isInteracting)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user