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

Representing a single drawable component in the game More...

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

Public Member Functions

 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

Protected Member Functions

virtual void Dispose (bool disposing)
 Dispose any and all objects, either managed or unmanaged at the end of this objects lifespan

Protected Attributes

GameCode game
 Access to the GameCode and everything it contains

Detailed Description

Representing a single drawable component in the game

Constructor & Destructor Documentation

MuGameFramework.GameComponent.GameComponent ( GameCode  game,
int  updateOrder = 0 
)

Initialize this instance of GameComponent

Parameters
gameThe GameCode that contains this object
updateOrderOrder in the GameComponent list to update and draw this object at

Member Function Documentation

virtual void MuGameFramework.GameComponent.Dispose ( bool  disposing)
protectedvirtual

Dispose any and all objects, either managed or unmanaged at the end of this objects lifespan

Parameters
disposingDispose of Managed objects?
void MuGameFramework.GameComponent.Dispose ( )

Used to explicitly free all resources currently in use by this object before destruction

virtual void MuGameFramework.GameComponent.Draw ( SpriteBatch  spriteBatch)
virtual

Draw the objects in the game every tick

Parameters
spriteBatchSpriteBatch used to draw the objects

Implements MuGameFramework.IDrawable.

virtual void MuGameFramework.GameComponent.Initialize ( )
virtual

Initialize objects in the game

Implements MuGameFramework.IUpdatable.

virtual void MuGameFramework.GameComponent.LoadContent ( )
virtual

Load content for thus objects in the game Runs before Initialize

Implements MuGameFramework.IDrawable.

virtual void MuGameFramework.GameComponent.UnloadContent ( )
virtual

Unload content loaded into the game

Implements MuGameFramework.IDrawable.

virtual void MuGameFramework.GameComponent.Update ( )
virtual

Update the objects in the game every tick

Implements MuGameFramework.IUpdatable.

Member Data Documentation

GameCode MuGameFramework.GameComponent.game
protected

Access to the GameCode and everything it contains


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