r2mods/ilspy_dump/ror2_csproj/EntityStates.JellyfishMonster/DeathState.cs

42 lines
892 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
using RoR2;
using UnityEngine;
using UnityEngine.Networking;
namespace EntityStates.JellyfishMonster;
public class DeathState : GenericCharacterDeath
{
public static GameObject enterEffectPrefab;
public override void OnEnter()
{
base.OnEnter();
DestroyModel();
if (NetworkServer.active)
{
DestroyBodyAsapServer();
}
}
protected override void CreateDeathEffects()
{
base.CreateDeathEffects();
if ((bool)enterEffectPrefab)
{
if (!EffectManager.ShouldUsePooledEffect(enterEffectPrefab))
{
EffectManager.SimpleEffect(enterEffectPrefab, base.transform.position, base.transform.rotation, transmit: false);
}
else
{
EffectManager.GetAndActivatePooledEffect(enterEffectPrefab, base.transform.position, base.transform.rotation);
}
}
}
public override InterruptPriority GetMinimumInterruptPriority()
{
return InterruptPriority.Death;
}
}