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
- Source
Methods
deserialize(props)
Populates the component properties from a data object. Override this method for custom property handling.
Parameters:
| Name | Type | Description |
|---|---|---|
props | object | The properties object (usually from JSON). |
- Inherited From
- Source
jump()
Request a jump. Uses coyote time and jump buffering.
move(direction, deltaTime)
Move horizontally.
Parameters:
| Name | Type | Description |
|---|---|---|
direction | number | -1 for left, 1 for right, 0 for none. |
deltaTime | number |
releaseJump()
Release jump button (for variable jump height).
update(deltaTime)
Update controller state. Call each frame.
Parameters:
| Name | Type | Description |
|---|---|---|
deltaTime | number |