Package | org.flixel |
Class | public class FlxMonitor |
Inheritance | FlxMonitor Object |
Property | Defined By | ||
---|---|---|---|
_data : Array
An array to hold all the data we are averaging. | FlxMonitor | ||
_itr : uint
Keeps track of where we are in the array. | FlxMonitor | ||
_size : uint
Stores the requested size of the monitor array. | FlxMonitor |
Method | Defined By | ||
---|---|---|---|
FlxMonitor(Size:uint, Default:Number = 0)
Creates the monitor array and sets the size. | FlxMonitor | ||
add(Data:Number):void
Adds an entry to the array of data. | FlxMonitor | ||
average():Number
Averages the value of all the numbers in the monitor window. | FlxMonitor |
_data | property |
protected var _data:Array
An array to hold all the data we are averaging.
_itr | property |
protected var _itr:uint
Keeps track of where we are in the array.
_size | property |
protected var _size:uint
Stores the requested size of the monitor array.
FlxMonitor | () | Constructor |
public function FlxMonitor(Size:uint, Default:Number = 0)
Creates the monitor array and sets the size.
ParametersSize:uint — The desired size - more entries means a longer window of averaging.
| |
Default:Number (default = 0 ) — The default value of the entries in the array (0 by default).
|
add | () | method |
public function add(Data:Number):void
Adds an entry to the array of data.
Parameters
Data:Number — The value you want to track and average.
|
average | () | method |
public function average():Number
Averages the value of all the numbers in the monitor window.
ReturnsNumber — The average value of all the numbers in the monitor window.
|