DashState allows actors to do quick horizontal dashes. These dashes have the capability to be initiated either on the ground or in the air, and allow numerous options for handling their momentum and behavior in conjunction with other movements.
public const string idString = “Dashing”
public float speed
The speed of the dash. Higher numbers means a faster dash!
public int minFrames
The minimum number of frames the dash can go for.
public int maxFrames
The maximum number of frames the dash can go for.
public bool canJump
Whether or not the actor can jump while a dash is active.
public bool isCanceledByJump
Whether or not the dash will be canceled if the actor jumps.
public bool isMomentumRetainedOnJump
If set to True, momentum from the dash will be retained when the actor jumps.
public bool requireDirectionalHoldToRetainMomentumOnJump
If set to True, the player must hold in the direction they’re moving in order to retain the dash’s momentum when they jump.
public bool canChangeDirection
Whether or not the actor can change directions mid-dash.
public bool isCanceledByDirectionChange
Whether or not changing directions mid-dash cancels out of the dash.
public bool canStartDashInAir
Whether or not the dash can be initiated while the actor is airborne.
public bool canDashFromLadders
Whether or not dashes can be initiated while the actor is climbing a ladder.
public bool willStopDashUponLanding
If True, an airborne dash will stop executing as soon as the actor touches the ground.
public int maxAirDashes
The maximum number of dashes that can be executed in the air before the actor touches the ground.
public bool willLockVerticalMovementOnAirDash
If True, the actor’s vertical movement will be locked when they air dash.
public bool isCanceledByWallContact
If True, an active dash will stop as soon as the actor hits a wall.