holdInput
holdInput<
Value>(headlessGame,handle,value):void
Holds handle at value in what every step from here reads, as a
player holding a key does: a button held or let go, an axis, a vector
or an angle at the step nearest the value. An edge button, such as
characters.inputs.jump, is pressed once: the next step takes it. A
button’s press and its let-go each reach the next step’s changes too,
as readInputChanges reads them.
holdInput(game, characters.inputs.move, { x: 0, y: 1 }) walks the
character forward.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
Value extends InputValue |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
headlessGame |
Pick<HeadlessGame, "world" | "input"> |
handle |
InputHandle<Value> |
value |
Value |
Returns
Section titled “Returns”void