Package | org.flixel.system |
Class | public class FlxReplay |
Inheritance | FlxReplay Object |
Property | Defined By | ||
---|---|---|---|
finished : Boolean
Whether the replay has finished playing or not. | FlxReplay | ||
frame : int
The current frame for this recording. | FlxReplay | ||
frameCount : int
The number of frames in this recording. | FlxReplay | ||
seed : Number
The random number generator seed value for this recording. | FlxReplay |
Property | Defined By | ||
---|---|---|---|
_capacity : int
Internal tracker for max number of frames we can fit before growing the _frames again. | FlxReplay | ||
_frames : Array
Internal container for all the frames in this replay. | FlxReplay | ||
_marker : int
Internal helper variable for keeping track of where we are in _frames during recording or replay. | FlxReplay |
Method | Defined By | ||
---|---|---|---|
Instantiate a new replay object. | FlxReplay | ||
create(Seed:Number):void
Create a new gameplay recording. | FlxReplay | ||
destroy():void
Clean up memory. | FlxReplay | ||
load(FileContents:String):void
Load replay data from a String object. | FlxReplay | ||
playNextFrame():void
Get the current frame record data and load it into the input managers. | FlxReplay | ||
recordFrame():void
Get the current input data from the input managers and store it in a new frame record. | FlxReplay | ||
rewind():void
Reset the replay back to the first frame. | FlxReplay | ||
save():String
Save the current recording data off to a String object. | FlxReplay |
Method | Defined By | ||
---|---|---|---|
init():void
Common initialization terms used by both create() and load() to set up the replay object. | FlxReplay |
_capacity | property |
protected var _capacity:int
Internal tracker for max number of frames we can fit before growing the _frames
again.
_frames | property |
protected var _frames:Array
Internal container for all the frames in this replay.
_marker | property |
protected var _marker:int
Internal helper variable for keeping track of where we are in _frames
during recording or replay.
finished | property |
public var finished:Boolean
Whether the replay has finished playing or not.
frame | property |
public var frame:int
The current frame for this recording.
frameCount | property |
public var frameCount:int
The number of frames in this recording.
seed | property |
public var seed:Number
The random number generator seed value for this recording.
FlxReplay | () | Constructor |
public function FlxReplay()
Instantiate a new replay object. Doesn't actually do much until you call create() or load().
create | () | method |
public function create(Seed:Number):void
Create a new gameplay recording. Requires the current random number generator seed.
Parameters
Seed:Number — The current seed from the random number generator.
|
destroy | () | method |
public function destroy():void
Clean up memory.
init | () | method |
protected function init():void
Common initialization terms used by both create()
and load()
to set up the replay object.
load | () | method |
public function load(FileContents:String):void
Load replay data from a String
object.
Strings can come from embedded assets or external
files loaded through the debugger overlay.
Parameters
FileContents:String — A String object containing a gameplay recording.
|
playNextFrame | () | method |
public function playNextFrame():void
Get the current frame record data and load it into the input managers.
recordFrame | () | method |
public function recordFrame():void
Get the current input data from the input managers and store it in a new frame record.
rewind | () | method |
public function rewind():void
Reset the replay back to the first frame.
save | () | method |
public function save():String
Save the current recording data off to a String
object.
Basically goes through and calls FrameRecord.save()
on each frame in the replay.
return The gameplay recording in simple ASCII format.
String |