feat: 플레이어 사망 애니메이션 네트워크 동기화
PlayDeathAnimationRpc로 모든 클라이언트에 사망 애니메이션 동기화 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -126,6 +126,19 @@ namespace Colosseum.Player
|
||||
currentMana.Value = Mathf.Min(MaxMana, currentMana.Value + amount);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 사망 애니메이션 재생 (모든 클라이언트에서 실행)
|
||||
/// </summary>
|
||||
[Rpc(SendTo.Everyone)]
|
||||
private void PlayDeathAnimationRpc()
|
||||
{
|
||||
var animator = GetComponentInChildren<Animator>();
|
||||
if (animator != null)
|
||||
{
|
||||
animator.SetTrigger("Die");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 사망 처리 (서버에서만 실행)
|
||||
/// </summary>
|
||||
@@ -149,12 +162,8 @@ namespace Colosseum.Player
|
||||
skillInput.enabled = false;
|
||||
}
|
||||
|
||||
// 사망 애니메이션 재생
|
||||
var animator = GetComponentInChildren<Animator>();
|
||||
if (animator != null)
|
||||
{
|
||||
animator.SetTrigger("Die");
|
||||
}
|
||||
// 모든 클라이언트에서 사망 애니메이션 재생
|
||||
PlayDeathAnimationRpc();
|
||||
|
||||
// 사망 이벤트 발생
|
||||
OnDeath?.Invoke(this);
|
||||
|
||||
Reference in New Issue
Block a user