Skip to content

@modoki/engine / index / setInputDigital

Function: setInputDigital()

setInputDigital(world, a, value, pressed?): void

Set a digital action's held level (and optionally its pressed edge) on the Input singleton. pressed defaults to mirror value so a test can express a one-frame press with setDigital(world, 'confirm', true).

Parameters

world

World

a

"cancel" | "pause" | "confirm" | "menu" | "jump" | "aim" | "navUp" | "navDown" | "navLeft" | "navRight"

value

boolean

pressed?

boolean = value

Returns

void

Built with Modoki.