isButtonPressed(button?: TButton | TButton[]): boolean
If any or certain bound button(s) are just pressed last frame on any input (keyboard, gamepad).onUpdate(() => { if (!isButtonPressed()) return // early return as no button was pressed if (isButtonPressed("jump")) debug.log("Player jumped") if (isButtonPressed(["left", "right"])) debug.log("Player moved") })
since
v3001.0