useArrowsForDirections
@zylem/game-lib / input / useArrowsForDirections
Function: useArrowsForDirections()
useArrowsForDirections(
player):GameInputConfig
Defined in: packages/game-lib/src/lib/input/input-presets.ts:52
Maps arrow keys to directions (Up/Down/Left/Right) for the given player.
Useful when includeDefaults is false and you still want arrow-key directions.
Parameters
player
"p1" | "p3" | "p4" | "p2" | "p6" | "p5" | "p7" | "p8"
Returns
Example
stage.setInputConfiguration(useArrowsForDirections('p1'));