r2mods/ilspy_dump/ror2_csproj/EntityStates.Engi.SpiderMine/PreDetonate.cs

27 lines
487 B
C#

namespace EntityStates.Engi.SpiderMine;
public class PreDetonate : BaseSpiderMineState
{
public static float baseDuration;
private float duration;
protected override bool shouldStick => false;
public override void OnEnter()
{
base.OnEnter();
duration = baseDuration;
base.rigidbody.isKinematic = true;
}
public override void FixedUpdate()
{
base.FixedUpdate();
if (base.isAuthority && duration <= base.fixedAge)
{
outer.SetNextState(new Detonate());
}
}
}