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.
Afficher le fichier Open project: jsbeckr/XnaFlixel

Protected Properties

Свойство Type Description
_data List
_itr int
_size int

Méthodes publiques

Méthode 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 méthode

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
Résultat void

Average() public méthode

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
Résultat float

FlxMonitor() public méthode

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
Résultat System.Collections.Generic

Property Details

_data protected_oe property

An array to hold all the data we are averaging.
protected List _data
Résultat List

_itr protected_oe property

Keeps track of where we are in the array.
protected int _itr
Résultat int

_size protected_oe property

Stores the requested size of the monitor array.
protected int _size
Résultat int