class flixel.system.replay.FrameRecord

Available on all platforms

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

Instance Fields

var frame:Int

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

var keys:Array<CodeValuePair>

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

var mouse:MouseRecord

A container for the 4 mouse state integers.

function new():Void

Instantiate array new frame record.

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

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

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.

function destroy():Void

Clean up memory.

function load(Data:String):FrameRecord

Load the frame record data from array simple ASCII string. *

Data

A String object containing the relevant frame record data.

function save():String

Save the frame record data to array simple ASCII string. *

returns

A String object containing the relevant frame record data.