PlayInput
A player’s input, as spawnite play press, hold, release and
move give it: each answers what is held after it.
Methods
Section titled “Methods”hold()
Section titled “hold()”hold(
controls,options?):Promise<HeldInput>
Holds each control down until release.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
controls |
Controls |
options? |
{ at?: PagePoint; } |
options.at? |
PagePoint |
Returns
Section titled “Returns”Promise<HeldInput>
move()
Section titled “move()”move(
control,options):Promise<HeldInput>
Moves the mouse, the wheel, a stick, a trigger or a finger: by an
amount, or to a place.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
control |
string |
options |
{ by?: number[]; to?: number[]; } |
options.by? |
number[] |
options.to? |
number[] |
Returns
Section titled “Returns”Promise<HeldInput>
press()
Section titled “press()”press(
controls,options?):Promise<HeldInput>
Presses each control and lets it go, in order; a chord such as
Shift+KeyW presses together. hold keeps each down that many
seconds of the game’s time, which the session steps.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
controls |
Controls |
options? |
{ at?: PagePoint; hold?: number; } |
options.at? |
PagePoint |
options.hold? |
number |
Returns
Section titled “Returns”Promise<HeldInput>
release()
Section titled “release()”release(
controls?):Promise<HeldInput>
Lets each control go; with none, everything held.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
controls? |
Controls |
Returns
Section titled “Returns”Promise<HeldInput>