Appearance
Kiln API / kiln / InputController
Interface: InputController
What app.input exposes. Implemented by the input plugin.
Methods
script()
ts
script(events): InputController;Queues scripted input, relative to the current frame.
Parameters
| Parameter | Type |
|---|---|
events | readonly ScriptEvent[] |
Returns
InputController
press()
ts
press(action): InputController;Holds an action down from the next frame on.
Parameters
| Parameter | Type |
|---|---|
action | string |
Returns
InputController
release()
ts
release(action): InputController;Parameters
| Parameter | Type |
|---|---|
action | string |
Returns
InputController
tap()
ts
tap(action): InputController;Presses on the next frame and releases the frame after.
Parameters
| Parameter | Type |
|---|---|
action | string |
Returns
InputController
setAxis()
ts
setAxis(x, y): InputController;Parameters
| Parameter | Type |
|---|---|
x | number |
y | number |
Returns
InputController
clearAxis()
ts
clearAxis(): InputController;Returns
InputController
reset()
ts
reset(): InputController;Drops scripted state and pending events.
Returns
InputController
record()
ts
record(): object;Starts recording what the game sees as a script: action values (press/release), the move axis when a stick or script drives it, and the pointer. stop() returns it (peek() copies it so far); script() replays it.
Returns
object
stop()
ts
stop(): ScriptEvent[];Returns
peek()
ts
peek(): ScriptEvent[];