r2mods/ilspy_dump/ror2_csproj/EntityStates.VoidRaidCrab.Leg/JointBroken.cs

26 lines
487 B
C#

namespace EntityStates.VoidRaidCrab.Leg;
public class JointBroken : BaseLegState
{
public override void OnEnter()
{
base.OnEnter();
base.legController.shouldRetract = true;
}
public override void OnExit()
{
base.OnExit();
base.legController.shouldRetract = false;
}
public override void FixedUpdate()
{
base.FixedUpdate();
if (base.legController.mainBodyHasEffectiveAuthority && base.legController.DoesJointExist())
{
outer.SetNextState(new Idle());
}
}
}