Input Forge - v0.3.1
    Preparing search index...

    Class AxesCommandAbstract

    Command for handling analog/axes input such as joysticks or WASD movement. Receives axis values representing direction and magnitude.

    Same as Command, but receives axis values:

    • trigger(axes) - Called when axes become active (moved from center)
    • update(axes) - Called every frame with current axis values
    • release() - Called when axes return to center/neutral
    class MoveCommand extends AxesCommand {
    constructor(private player: Player) {
    super();
    }

    trigger(axes: AxesInput): void {
    this.player.startMoving(axes.x, axes.y);
    }

    update(axes: AxesInput): void {
    this.player.move(axes.x, axes.y);
    }

    release(): void {
    this.player.stopMoving();
    }
    }

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Called once when the input becomes inactive. Override this to handle cleanup or end states.

      Returns void