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.
파일 보기 프로젝트 열기: jsbeckr/XnaFlixel

보호된 프로퍼티들

프로퍼티 타입 설명
_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