mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-16 16:34:41 +01:00
40 lines
675 B
C#
40 lines
675 B
C#
using MoleMole.Config;
|
|
|
|
namespace MoleMole
|
|
{
|
|
public class MonoJokeBoxProp : MonoBarrelProp
|
|
{
|
|
private const string TRIGGER_BORN = "BornTrigger";
|
|
|
|
private KillEffect _killEffect;
|
|
|
|
private bool _isAlive;
|
|
|
|
public override void Init(uint runtimeID)
|
|
{
|
|
base.Init(runtimeID);
|
|
DestroyDelay = 2.3f;
|
|
_isAlive = true;
|
|
}
|
|
|
|
public override void SetDied(KillEffect killEffect)
|
|
{
|
|
SetCountedDenySelect(true, true);
|
|
_isAlive = false;
|
|
_killEffect = killEffect;
|
|
SetTrigger("BornTrigger");
|
|
}
|
|
|
|
public override bool IsActive()
|
|
{
|
|
return _isAlive;
|
|
}
|
|
|
|
[AnimationCallback]
|
|
public void BornEndTriggerDied()
|
|
{
|
|
base.SetDied(_killEffect);
|
|
}
|
|
}
|
|
}
|