Package | org.flixel.system |
Class | public class FlxMonitor |
Inheritance | FlxMonitor ![]() |
Property | Defined By | ||
---|---|---|---|
full : Boolean
Shows whether the monitor has been filled all the way yet or not. | 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 | ||
_last : Number
Just stores the last number we added. | 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 | ||
clear(Default:Number = 0):void
Goes through and sets every entry in the monitor to Default (0). | FlxMonitor | ||
last():Number
Retrieves the last value added to the monitor. | FlxMonitor | ||
total():Number
Adds up all the values in the monitor window. | FlxMonitor | ||
trend():Number
Tells you if the monitor window is charting up or down. | 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.
_last | property |
protected var _last:Number
Just stores the last number we added.
_size | property |
protected var _size:uint
Stores the requested size of the monitor array.
full | property |
public var full:Boolean
Shows whether the monitor has been filled all the way yet or not.
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.
|
clear | () | method |
public function clear(Default:Number = 0):void
Goes through and sets every entry in the monitor to Default (0).
Parameters
Default:Number (default = 0 ) — The new value you want ever entry to have.
|
last | () | method |
public function last():Number
Retrieves the last value added to the monitor.
ReturnsNumber |
total | () | method |
public function total():Number
Adds up all the values in the monitor window.
ReturnsNumber — The total value of all the entries in the monitor.
|
trend | () | method |
public function trend():Number
Tells you if the monitor window is charting up or down.
ReturnsNumber — The difference between the oldest number in the monitor and the average.
|