From 6954e8b80b4e48da62df31a28619a6e46bc6bd02 Mon Sep 17 00:00:00 2001 From: dal4segno Date: Mon, 16 Mar 2026 09:47:13 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=ED=94=8C=EB=A0=88=EC=9D=B4=EC=96=B4=20?= =?UTF-8?q?=EC=82=AC=EB=A7=9D=20=EC=95=A0=EB=8B=88=EB=A9=94=EC=9D=B4?= =?UTF-8?q?=EC=85=98=20=EB=84=A4=ED=8A=B8=EC=9B=8C=ED=81=AC=20=EB=8F=99?= =?UTF-8?q?=EA=B8=B0=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PlayDeathAnimationRpc로 모든 클라이언트에 사망 애니메이션 동기화 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus --- .../Scripts/Player/PlayerNetworkController.cs | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/Assets/Scripts/Player/PlayerNetworkController.cs b/Assets/Scripts/Player/PlayerNetworkController.cs index 22a6da79..ff6bef8f 100644 --- a/Assets/Scripts/Player/PlayerNetworkController.cs +++ b/Assets/Scripts/Player/PlayerNetworkController.cs @@ -126,6 +126,19 @@ namespace Colosseum.Player currentMana.Value = Mathf.Min(MaxMana, currentMana.Value + amount); } + /// + /// 사망 애니메이션 재생 (모든 클라이언트에서 실행) + /// + [Rpc(SendTo.Everyone)] + private void PlayDeathAnimationRpc() + { + var animator = GetComponentInChildren(); + if (animator != null) + { + animator.SetTrigger("Die"); + } + } + /// /// 사망 처리 (서버에서만 실행) /// @@ -149,12 +162,8 @@ namespace Colosseum.Player skillInput.enabled = false; } - // 사망 애니메이션 재생 - var animator = GetComponentInChildren(); - if (animator != null) - { - animator.SetTrigger("Die"); - } + // 모든 클라이언트에서 사망 애니메이션 재생 + PlayDeathAnimationRpc(); // 사망 이벤트 발생 OnDeath?.Invoke(this);