Helper class for the new replay system. Represents all the game inputs for one "frame" or "step" of the game loop.

Constructor

new()

Instantiate array new frame record.

Variables

frame:Int

Which frame of the game loop this record is from or for.

keys:Array<CodeValuePair>

An array of simple integer pairs referring to what key is pressed, and what state its in.

mouse:MouseRecord

A container for the 4 mouse state integers.

Methods

create(Frame:Float, ?Keys:Array<CodeValuePair>, ?Mouse:MouseRecord):FrameRecord

Load this frame record with input data from the input managers.

Parameters:

Frame

What frame it is.

Keys

Keyboard data from the keyboard manager.

Mouse

Mouse data from the mouse manager.

Returns:

A reference to this FrameRecord object.

destroy():Void

Clean up memory.

load(Data:String):FrameRecord

Load the frame record data from array simple ASCII string.

Parameters:

Data

A String object containing the relevant frame record data.

save():String

Save the frame record data to array simple ASCII string.

Returns:

A String object containing the relevant frame record data.