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

24 lines
500 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
using RoR2.VoidRaidCrab;
namespace EntityStates.VoidRaidCrab.Leg;
public class BaseLegState : EntityState
{
protected LegController legController { get; private set; }
public override void OnEnter()
{
base.OnEnter();
legController = legController ?? GetComponent<LegController>();
}
public override void ModifyNextState(EntityState nextState)
{
base.ModifyNextState(nextState);
if (nextState is BaseLegState baseLegState)
{
baseLegState.legController = legController;
}
}
}