Documentation / @debuffjp/dev / InputRecording
Class: InputRecording
Defined in: dev/src/replay.ts:37
Records input and param changes per simulation tick from page load, so a live session can be turned into a scenario that replays it exactly (the fixed-step clock and seeded RNG make runs deterministic). Wraps the input's own methods, so real events, dev hooks and agents are all captured. Dev only.
Constructors
Constructor
new InputRecording(
game,input):InputRecording
Defined in: dev/src/replay.ts:44
Parameters
game
input
Returns
InputRecording
Accessors
count
Get Signature
get count():
number
Defined in: dev/src/replay.ts:92
Events recorded so far.
Returns
number
Methods
command()
command(
name,args):void
Defined in: dev/src/replay.ts:122
Record a game command (see DevHooksOptions.commands) so replays run it at the same tick.
Parameters
name
string
args
unknown[]
Returns
void
dispose()
dispose():
void
Defined in: dev/src/replay.ts:117
Returns
void
toReplay()
toReplay(
toTick?,name?):Replay
Defined in: dev/src/replay.ts:102
The session from page load up to toTick (default: now) as scenario steps.
Parameters
toTick?
number = ...
name?
string = ...
Returns
warn()
warn(
message):void
Defined in: dev/src/replay.ts:97
Note something that makes an exact replay impossible (shown with the replay).
Parameters
message
string
Returns
void