C# Class Nez.FramesPerSecondCounter

Inheritance: Text, IUpdatable
Show file Open project: prime31/Nez

Public Properties

Property Type Description
averageFramesPerSecond float
currentFramesPerSecond float
maximumSamples int
totalFrames long

Public Methods

Method Description
FramesPerSecondCounter ( BitmapFont font, Color color, FPSDockPosition dockPosition = FPSDockPosition.TopRight, int maximumSamples = 100 ) : System.Collections.Generic
FramesPerSecondCounter ( NezSpriteFont font, Color color, FPSDockPosition dockPosition = FPSDockPosition.TopRight, int maximumSamples = 100 ) : System.Collections.Generic
IUpdatable ( ) : void
debugRender ( Graphics graphics ) : void
init ( ) : void
render ( Graphics graphics, Camera camera ) : void
reset ( ) : void
setDockOffset ( Vector2 dockOffset ) : FramesPerSecondCounter

Sets how far the fps text will appear from the edges of the screen.

setDockPosition ( FPSDockPosition dockPosition ) : FramesPerSecondCounter

Sets which corner of the screen the fps text will show.

updateTextPosition ( ) : void

Method Details

FramesPerSecondCounter() public method

public FramesPerSecondCounter ( BitmapFont font, Color color, FPSDockPosition dockPosition = FPSDockPosition.TopRight, int maximumSamples = 100 ) : System.Collections.Generic
font BitmapFont
color Color
dockPosition FPSDockPosition
maximumSamples int
return System.Collections.Generic

FramesPerSecondCounter() public method

public FramesPerSecondCounter ( NezSpriteFont font, Color color, FPSDockPosition dockPosition = FPSDockPosition.TopRight, int maximumSamples = 100 ) : System.Collections.Generic
font NezSpriteFont
color Color
dockPosition FPSDockPosition
maximumSamples int
return System.Collections.Generic

IUpdatable() public method

public IUpdatable ( ) : void
return void

debugRender() public method

public debugRender ( Graphics graphics ) : void
graphics Graphics
return void

init() public method

public init ( ) : void
return void

render() public method

public render ( Graphics graphics, Camera camera ) : void
graphics Graphics
camera Camera
return void

reset() public method

public reset ( ) : void
return void

setDockOffset() public method

Sets how far the fps text will appear from the edges of the screen.
public setDockOffset ( Vector2 dockOffset ) : FramesPerSecondCounter
dockOffset Vector2 Offset from screen edges
return FramesPerSecondCounter

setDockPosition() public method

Sets which corner of the screen the fps text will show.
public setDockPosition ( FPSDockPosition dockPosition ) : FramesPerSecondCounter
dockPosition FPSDockPosition Corner of the screen
return FramesPerSecondCounter

updateTextPosition() public method

public updateTextPosition ( ) : void
return void

Property Details

averageFramesPerSecond public property

public float averageFramesPerSecond
return float

currentFramesPerSecond public property

public float currentFramesPerSecond
return float

maximumSamples public property

total number of samples that should be stored and averaged for calculating the FPS
public int maximumSamples
return int

totalFrames public property

public long totalFrames
return long