JumpState allows an actor to jump. It gives the actor access to multi or infinite jumps, as well.
public void OnBounce()
Used internally to reset currentJump to 1 when a bounce occurs.
public void OnLadderExit()
Called automatically by LadderState to reset the current jump number to 0 after an actor drops from a ladder.
public bool CanEnd()
Used internally to prevent jumps from ending on their first frame before the actor has fully left the ground.
public const string idString = “Jumping”
public float speed
The vertical speed of the jump. Faster means higher jumps.
public JumpType type
Whether the jump is Finite, Infinite, or None.
public int multipleJumpNumber
If the jumpType is Finite, this is the total number of jumps the actor can perform before touching the ground.
public bool canMultiJumpOutOfFall
If two or more jumps are enabled, this determines whether or not you can perform additional jumps after falling, even if the initial jump wasn’t initiated on the ground.
public int minFrames
The minimum number of frames the jump can go for. The jump will go on for at least this many frames even if the player releases the jump button beforehand.
public int maxFrames
The maximum number of frames the jump can go for. The jump will terminate after this many frames even if the player is still holding the jump button.
public bool willLockHorizontalMovement
Setting this to True prevents you from maneuvering in midair after a jump is started.
public Animations animations
In addition to its base animation, you can also slot AnimationClips for the Start and Crest of the jump.
public Substate substate
Set to Starting, Body, or Cresting; determines the phase the current jump is in.
public Direction.Horizontal direction
If the jump has been horizontally locked, this saves the direction the jump started in and locks you in.
public bool isGroundedWithJumpButtonUp
If a JetInput is slotted in the JetController, this determines if the actor is on the ground while the jump button is not being pressed. Used when determining if a new jump can be initiated.