跳转到内容

defineInputMap

此内容尚不支持你的语言。

defineInputMap(actions): InputMap

Defined in: input/inputMap.ts:472

Define a named-action input map and register render/fixed evaluation systems. Returns the live map — import it and query by name from any system.

Record<string, ActionDef>

InputMap

export const Game = defineInputMap({ Jump: Button(Key('Space'), GpButton(GamepadButton.South)) });
// In a system: if (Game.pressed('Jump')) jump();
@public