PlatformerObjectRuntimeBehavior

PlatformerObjectRuntimeBehavior

PlatformerObjectRuntimeBehavior represents a behavior allowing objects to be considered as a platform by objects having PlatformerObject Behavior.

Constructor

new PlatformerObjectRuntimeBehavior()

Source:

Methods

canGrabPlatforms()

Check if the Platformer Object can grab the platforms.

Returns:
Type Description

Returns true if the object can grab the platforms.

Source:

canJump()

Check if the Platformer Object can jump.

Returns:
Type Description

Returns true if the object can jump.

Source:

getAcceleration()

Get the acceleration value of the Platformer Object.

Returns:
Type Description

The current acceleration.

Source:

getCurrentFallSpeed()

Get the speed at which the object is falling. It is 0 when the object is on a floor, and non 0 as soon as the object leaves the floor.

Returns:
Type Description

The current fall speed.

Source:

getCurrentJumpSpeed()

Get the current jump speed of the Platformer Object.

Returns:
Type Description

The current jump speed.

Source:

getCurrentSpeed()

Get the current speed of the Platformer Object.

Returns:
Type Description

The current speed.

Source:

getDeceleration()

Get the deceleration of the Platformer Object.

Returns:
Type Description

The current deceleration.

Source:

getGravity()

Get the gravity of the Platformer Object.

Returns:
Type Description

The current gravity.

Source:

getJumpSpeed()

Get the jump speed of the Platformer Object.

Returns:
Type Description

The jump speed.

Source:

getJumpSustainTime()

Get the jump sustain time of the Platformer Object.

Returns:
Type Description

The jump sustain time.

Source:

getLadderClimbingSpeed()

Get the speed used to move on Y axis when climbing a ladder.

Returns:
Type Description

The speed of ladder climbing.

Source:

getMaxFallingSpeed()

Get the maximum falling speed of the Platformer Object.

Returns:
Type Description

The maximum falling speed.

Source:

getMaxSpeed()

Get the maximum speed of the Platformer Object.

Returns:
Type Description

The maximum speed.

Source:

ignoreDefaultControls(ignore)

Ignore the default controls of the Platformer Object.

Parameters:
Name Type Description
ignore

Enable / Disable default controls.

Source:

isFalling()

Check if the Platformer Object is falling.

Returns:
Type Description

Returns true if it is falling and false if not.

Source:

isGrabbingPlatform()

Check if the Platformer Object is grabbing a platform.

Returns:
Type Description

Returns true if a platform is grabbed and false if not.

Source:

isJumping()

Check if the Platformer Object is jumping.

Returns:
Type Description

Returns true if jumping and false if not.

Source:

isMoving()

Check if the Platformer Object is moving.

Returns:
Type Description

Returns true if it is moving and false if not.

Source:

isOnFloor()

Check if the Platformer Object is on the floor.

Returns:
Type Description

Returns true if on the floor and false if not.

Source:

isOnLadder()

Check if the Platformer Object is on a ladder.

Returns:
Type Description

Returns true if on a ladder and false if not.

Source:

setAcceleration(acceleration)

Set the acceleration of the Platformer Object.

Parameters:
Name Type Description
acceleration

The new acceleration.

Source:

setCanGrabPlatforms(enable)

Set if the Platformer Object can grab platforms.

Parameters:
Name Type Description
enable

Enable / Disable grabbing of platforms.

Source:

setCanJump()

Allow the Platformer Object to jump again.

Source:

setDeceleration(deceleration)

Set the deceleration of the Platformer Object.

Parameters:
Name Type Description
deceleration

The new deceleration.

Source:

setGravity(gravity)

Set the gravity of the Platformer Object.

Parameters:
Name Type Description
gravity

The new gravity.

Source:

setJumpSpeed(jumpSpeed)

Set the jump speed of the Platformer Object.

Parameters:
Name Type Description
jumpSpeed

The new jump speed.

Source:

setJumpSustainTime(jumpSpeed)

Set the jump sustain time of the Platformer Object.

Parameters:
Name Type Description
jumpSpeed

The new jump sustain time.

Source:

setLadderClimbingSpeed(ladderClimbingSpeed)

Set the speed used to move on Y axis when climbing a ladder.

Parameters:
Name Type Description
ladderClimbingSpeed

The speed of ladder climbing.

Source:

setMaxFallingSpeed(maxFallingSpeed)

Set the maximum falling speed of the Platformer Object.

Parameters:
Name Type Description
maxFallingSpeed

The maximum falling speed.

Source:

setMaxSpeed(maxSpeed)

Set the maximum speed of the Platformer Object.

Parameters:
Name Type Description
maxSpeed

The new maximum speed.

Source:

setSlopeMaxAngle(slopeMaxAngle)

Set the maximum slope angle of the Platformer Object.

Parameters:
Name Type Description
slopeMaxAngle

The new maximum slope angle.

Source:

simulateControl(input)

Simulate a control action in the Platformer Object by specifying an input.

Parameters:
Name Type Description
input

The string expression of the control action [Left,Right,Up,Down,Ladder,Jump,Release].

Source:

simulateDownKey()

Simulate the "Down" control of the Platformer Object.

Source:

simulateJumpKey()

Simulate the "Jump" control of the Platformer Object.

Source:

simulateLadderKey()

Simulate the "Ladder" control of the Platformer Object.

Source:

simulateLeftKey()

Simulate the "Left" control of the Platformer Object.

Source:

simulateReleaseKey()

Simulate the "Release" control of the Platformer Object.

Source:

simulateRightKey()

Simulate the "Right" control of the Platformer Object.

Source:

simulateUpKey()

Simulate the "Up" control of the Platformer Object.

Source: