WallClingState

WallCling state allows the actor to slide down walls, climb up and down walls, and jump from walls (when used in conjunction with JumpState.) It also allows the actor to hang from ledges.

Public Methods

public bool IsWallJumpPossible()

Used internally and by JumpState to determine if the actor can perform a wall jump while against a wall.

Public Members

public const string idString = “WallCling”

public WallJump wallJump

WallJump properties which can be set in the Inspector. These include: enableWallJump, which determines if the actor can perform wall jumps; wallJumpGraceFrames, which allows the player a set number of frames to perform a wall jump even after wall contact has stopped; and wallJumpKickbackFrames, which allows the actor to be pushed away from the wall for a set number of frames after the jump first begins.

public WallClimb wallClimb

Properties pertaining to the actor’s ability to climb walls. These include: enableClimbing, which determines if the actor can climb; and climbSpeed, which sets the vertical wall climbing speed of the actor.

public LedgeGrab ledgeGrab

Properties pertaining to the ledge grab capabilities of the actor. These include: enableLedgeGrab, which determines if the actor can grab ledges; and canLedgeJump, which determines if the actor can perform a jump out of the ledge grab state.

public bool enableClingWhileJumping

If this is false, the actor cannot cling to or grab a wall while in the rising portion of a jump.

public bool clingRequiresDirectionalHold

If this is true, it requires the player to press the directional buttons in the direction of the wall in order to stay attached to it. If false, simply touching the wall is enough.

public bool canDisengageWithDirectionalPress

If true, the player can press in the horizontal direction away from the wall they’re currently attached to to detach themselves. If false, the player can only detach by climbing/sliding to the ground or hitting the Jump button.

public float wallSlideSpeed

The speed at which the actor will slide down a wall while attached to it. Setting this to 0, or enabling wall climbing via WallClimb.enableClimbing, will prevent the actor from sliding down the wall, allowing them to cling in place.

public bool attacksReverseOnWall

If true, the actor will attack away from the wall while clinging to it; if false, the actor will attack into the wall.

public Animations animations

Animations can be slotted here for ledge hanging and climbing the wall. The default animation for this state will play as the actor slides down the wall.