r2mods/ilspy_dump/ror2_csproj/EntityStates.Engi.Mine/WaitForStick.cs

29 lines
566 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
using UnityEngine.Networking;
namespace EntityStates.Engi.Mine;
public class WaitForStick : BaseMineState
{
protected override bool shouldStick => true;
protected override bool shouldRevertToWaitForStickOnSurfaceLost => false;
public override void OnEnter()
{
base.OnEnter();
if (NetworkServer.active)
{
base.armingStateMachine.SetNextState(new MineArmingUnarmed());
}
}
public override void FixedUpdate()
{
base.FixedUpdate();
if (NetworkServer.active && base.projectileStickOnImpact.stuck)
{
outer.SetNextState(new Arm());
}
}
}