MuGameFramework  1.0
MuGameFramework is a 2D game framework built upon C# and SFML
 All Classes Namespaces Files Functions Variables Enumerations Properties
MuGameFramework.Diagnostics.FPSCounter Class Reference

Provides a visual FPS counter on screen More...

Inheritance diagram for MuGameFramework.Diagnostics.FPSCounter:
MuGameFramework.GameComponent MuGameFramework.IUpdatable MuGameFramework.IDrawable

Public Member Functions

 FPSCounter (Vector2 position, GameCode game)
 Create an instance of the FPSCounter object
void Draw (GameTime gameTime, SpriteBatch spriteBatch, string preText="")
 Update framerate and draw the FPS counter on screen
void Draw (GameTime gameTime)
 Update framerate
- Public Member Functions inherited from MuGameFramework.GameComponent
 GameComponent (GameCode game, int updateOrder=0)
 Initialize this instance of GameComponent
virtual void Initialize ()
 Initialize objects in the game
virtual void LoadContent ()
 Load content for thus objects in the game Runs before Initialize
virtual void UnloadContent ()
 Unload content loaded into the game
virtual void Update ()
 Update the objects in the game every tick
virtual void Draw (SpriteBatch spriteBatch)
 Draw the objects in the game every tick
void Dispose ()
 Used to explicitly free all resources currently in use by this object before destruction

Properties

uint FrameRate [get, set]
 Current framerate of the game

Additional Inherited Members

- Protected Member Functions inherited from MuGameFramework.GameComponent
virtual void Dispose (bool disposing)
 Dispose any and all objects, either managed or unmanaged at the end of this objects lifespan
- Protected Attributes inherited from MuGameFramework.GameComponent
GameCode game
 Access to the GameCode and everything it contains

Detailed Description

Provides a visual FPS counter on screen

Constructor & Destructor Documentation

MuGameFramework.Diagnostics.FPSCounter.FPSCounter ( Vector2  position,
GameCode  game 
)

Create an instance of the FPSCounter object

Parameters
positionPosition to draw the framerate string at
gameGame that is running this

Member Function Documentation

void MuGameFramework.Diagnostics.FPSCounter.Draw ( GameTime  gameTime,
SpriteBatch  spriteBatch,
string  preText = "" 
)

Update framerate and draw the FPS counter on screen

Parameters
gameTimeCurrent gameTime object
spriteBatchSpritebatch used to draw stuff on screen
preTextText to show before the actual framerate value
void MuGameFramework.Diagnostics.FPSCounter.Draw ( GameTime  gameTime)

Update framerate

Parameters
gameTimeCurrent gameTime object

Property Documentation

uint MuGameFramework.Diagnostics.FPSCounter.FrameRate
getset

Current framerate of the game


The documentation for this class was generated from the following file: