Attack states are actions that characters can perform to deal damage to enemies. They all Inherit from the base AttackState
to share the same basic features:
- Can't turn around during attacks.
- Other actions can't interrupt attacks (unless they use
StateMachine.ForceSetState
like the Flinch State as explained on the Changing States page). - When the state ends, it clears any of the Hit Boxes that are still active.
public abstract class AttackState : CharacterState
{
public override bool CanTurn => false;
public override bool CanExitState => false;
public override void OnExitState()
{
base.OnExitState();
Character.Animancer.EndHitSequence();
}
}
Basic Action | A general action that plays an animation then returns to idle. |
Advanced Attack | The Player's attack state which has combos and separate animations for ground, air, and while aiming upwards. |
Side Attack | The Maw Flower's attack state has different animations depending on whether it wants to attack to the left or right. |