C# Class XnaFlixel.FlxMonitor

FlxMonitor is a simple class that aggregates and averages data. Flixel uses this to display the framerate and profiling data in the developer console. It's nice for keeping track of things that might be changing too fast from frame to frame.
Mostrar archivo Open project: jsbeckr/XnaFlixel

Protected Properties

Property Type Description
_data List
_itr int
_size int

Public Methods

Method Description
Add ( float Data ) : void

Adds an entry to the array of data. @param Data The value you want to track and average.

Average ( ) : float

Averages the value of all the numbers in the monitor window. @return The average value of all the numbers in the monitor window.

FlxMonitor ( int Size, float Default ) : System.Collections.Generic

Creates the monitor array and sets the size. @param Size The desired size - more entries means a longer window of averaging. @param Default The default value of the entries in the array (0 by default).

Method Details

Add() public method

Adds an entry to the array of data. @param Data The value you want to track and average.
public Add ( float Data ) : void
Data float
return void

Average() public method

Averages the value of all the numbers in the monitor window. @return The average value of all the numbers in the monitor window.
public Average ( ) : float
return float

FlxMonitor() public method

Creates the monitor array and sets the size. @param Size The desired size - more entries means a longer window of averaging. @param Default The default value of the entries in the array (0 by default).
public FlxMonitor ( int Size, float Default ) : System.Collections.Generic
Size int
Default float
return System.Collections.Generic

Property Details

_data protected_oe property

An array to hold all the data we are averaging.
protected List _data
return List

_itr protected_oe property

Keeps track of where we are in the array.
protected int _itr
return int

_size protected_oe property

Stores the requested size of the monitor array.
protected int _size
return int