| Package | org.flixel |
| Class | public class FlxMonitor |
| 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:ArrayAn array to hold all the data we are averaging.
| _itr | property |
protected var _itr:uintKeeps track of where we are in the array.
| _size | property |
protected var _size:uintStores 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):voidAdds an entry to the array of data.
ParametersData:Number — The value you want to track and average.
|
| average | () | method |
public function average():NumberAverages the value of all the numbers in the monitor window.
ReturnsNumber — The average value of all the numbers in the monitor window.
|