PlatformerController

new PlatformerController()

PlatformerController handles player input for platformer movement. Includes coyote time, jump buffering, and variable jump height.

Extends

Members

(readonly) properties

The entity that this component is attached to.

Inherited From

Methods

deserialize(props)

Populates the component properties from a data object. Override this method for custom property handling.

Parameters:
NameTypeDescription
propsobject

The properties object (usually from JSON).

Inherited From

jump()

Request a jump. Uses coyote time and jump buffering.

move(direction, deltaTime)

Move horizontally.

Parameters:
NameTypeDescription
directionnumber

-1 for left, 1 for right, 0 for none.

deltaTimenumber

releaseJump()

Release jump button (for variable jump height).

update(deltaTime)

Update controller state. Call each frame.

Parameters:
NameTypeDescription
deltaTimenumber