Packageorg.flixel.plugin
Classpublic class TimerManager
InheritanceTimerManager Inheritance FlxBasic Inheritance Object

A simple manager for tracking and updating game timer objects.



Public Properties
 PropertyDefined By
 Inheritedactive : Boolean
Controls whether update() is automatically called by FlxState/FlxGroup.
FlxBasic
 Inherited_ACTIVECOUNT : uint
[static]
FlxBasic
 Inheritedalive : Boolean
Useful state for many game objects - "dead" (!alive) vs alive.
FlxBasic
 Inheritedcameras : Array
An array of camera objects that this object will use during draw().
FlxBasic
 Inheritedexists : Boolean
Controls whether update() and draw() are automatically called by FlxState/FlxGroup.
FlxBasic
 InheritedID : int
IDs seem like they could be pretty useful, huh? They're not actually used for anything yet though.
FlxBasic
 InheritedignoreDrawDebug : Boolean
Setting this to true will prevent the object from appearing when the visual debug mode in the debugger overlay is toggled on.
FlxBasic
 Inheritedvisible : Boolean
Controls whether draw() is automatically called by FlxState/FlxGroup.
FlxBasic
 Inherited_VISIBLECOUNT : uint
[static]
FlxBasic
Protected Properties
 PropertyDefined By
  _timers : Array
TimerManager
Public Methods
 MethodDefined By
  
Instantiates a new timer manager.
TimerManager
  
add(Timer:FlxTimer):void
Add a new timer to the timer manager.
TimerManager
  
clear():void
Removes all the timers from the timer manager.
TimerManager
  
destroy():void
[override] Clean up memory.
TimerManager
 Inherited
draw():void
Override this function to control how the object is drawn.
FlxBasic
 Inherited
drawDebug(Camera:FlxCamera = null):void
Override this function to draw custom "debug mode" graphics to the specified camera while the debugger's visual mode is toggled on.
FlxBasic
 Inherited
kill():void
Handy function for "killing" game objects.
FlxBasic
 Inherited
postUpdate():void
Post-update is called right after update() on each object in the game loop.
FlxBasic
 Inherited
preUpdate():void
Pre-update is called right before update() on each object in the game loop.
FlxBasic
  
remove(Timer:FlxTimer):void
Remove a timer from the timer manager.
TimerManager
 Inherited
revive():void
Handy function for bringing game objects "back to life".
FlxBasic
 Inherited
toString():String
Convert object to readable string name.
FlxBasic
  
update():void
[override] Called by FlxG.updatePlugins() before the game state has been updated.
TimerManager
Property Detail
_timersproperty
protected var _timers:Array

Constructor Detail
TimerManager()Constructor
public function TimerManager()

Instantiates a new timer manager.

Method Detail
add()method
public function add(Timer:FlxTimer):void

Add a new timer to the timer manager. Usually called automatically by FlxTimer's constructor.

Parameters

Timer:FlxTimer — The FlxTimer you want to add to the manager.

clear()method 
public function clear():void

Removes all the timers from the timer manager.

destroy()method 
override public function destroy():void

Clean up memory.

remove()method 
public function remove(Timer:FlxTimer):void

Remove a timer from the timer manager. Usually called automatically by FlxTimer's stop() function.

Parameters

Timer:FlxTimer — The FlxTimer you want to remove from the manager.

update()method 
override public function update():void

Called by FlxG.updatePlugins() before the game state has been updated. Cycles through timers and calls update() on each one.