Highroad Engine v1.3
|
Add this class to a gameObject with a Text component and it'll feed it the number of FPS in real time. More...
Public Types | |
enum | Modes { Instant , MovingAverage , InstantAndMovingAverage } |
Public Attributes | |
float | UpdateInterval = 0.3f |
the frequency at which the FPS counter should update (in seconds) More... | |
Modes | Mode = Modes.Instant |
if this is true, this counter will display a moving average of the framerate, not its instant framerate More... | |
Protected Member Functions | |
virtual void | Start () |
On Start(), we get the Text component and initialize our counter More... | |
virtual void | Update () |
On Update, we increment our various counters, and if we've reached our UpdateInterval, we update our FPS counter with the number of frames displayed since the last counter update More... | |
Protected Attributes | |
float | _framesAccumulated = 0f |
float | _framesDrawnInTheInterval = 0f |
float | _timeLeft |
Text | _text |
int | _currentFPS |
int | _totalFrames = 0 |
int | _average |
Add this class to a gameObject with a Text component and it'll feed it the number of FPS in real time.
|
protectedvirtual |
On Start(), we get the Text component and initialize our counter
|
protectedvirtual |
On Update, we increment our various counters, and if we've reached our UpdateInterval, we update our FPS counter with the number of frames displayed since the last counter update
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Modes MoreMountains.Tools.MMFPSCounter.Mode = Modes.Instant |
if this is true, this counter will display a moving average of the framerate, not its instant framerate
float MoreMountains.Tools.MMFPSCounter.UpdateInterval = 0.3f |
the frequency at which the FPS counter should update (in seconds)