r2mods/ilspy_dump/ror2_csproj/EntityStates.FalseSonBoss/FalseSonBossGenericStateWit...

47 lines
985 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
namespace EntityStates.FalseSonBoss;
public class FalseSonBossGenericStateWithSwing : GenericCharacterMain
{
private bool transitioningToMeleeSwingState;
public override void OnEnter()
{
base.OnEnter();
transitioningToMeleeSwingState = false;
}
public override void Update()
{
if (base.characterBody == null || base.characterBody.coreTransform == null)
{
if (outer != null)
{
outer.SetNextStateToMain();
}
return;
}
base.Update();
if (!transitioningToMeleeSwingState)
{
FalseSonBossStateHelper.TrySwitchToMeleeSwing(ref transitioningToMeleeSwingState, base.characterBody.coreTransform, base.characterDirection.forward, null, outer);
}
}
public override void FixedUpdate()
{
if (!transitioningToMeleeSwingState)
{
base.FixedUpdate();
}
}
public override InterruptPriority GetMinimumInterruptPriority()
{
if (transitioningToMeleeSwingState)
{
return InterruptPriority.Frozen;
}
return InterruptPriority.Any;
}
}