C# Класс 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.
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
_data List
_itr int
_size int

Открытые методы

Метод Описание
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).

Описание методов

Add() публичный Метод

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
Результат void

Average() публичный Метод

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
Результат float

FlxMonitor() публичный Метод

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
Результат System.Collections.Generic

Описание свойств

_data защищенное свойство

An array to hold all the data we are averaging.
protected List _data
Результат List

_itr защищенное свойство

Keeps track of where we are in the array.
protected int _itr
Результат int

_size защищенное свойство

Stores the requested size of the monitor array.
protected int _size
Результат int