Game Development Reference
In-Depth Information
Member variables
Purpose
This is only used by the debug code in the GameLoop()
method.
m_FrameCount
Holds the current FPS (frames per second) that the game
loop is running at.
m_FPS
Now that we've created our member variables, we need to make some properties
to provide access to the ones that need to be accessible from outside of this class.
A property is just a pair of methods for getting and setting the value of the mem-
ber variable it represents. These methods are often called accessor methods or
accessors . Most of the variables we just created will have accessors, but we don't
have room to show them all here, so we will just look at the first one.
Tip
Check out the downloadable code to see the rest of the accessor methods.
Here is the code for the ClearColor property:
public Color4 ClearColor
{
get
{
return m_ClearColor;
}
protected set
{
m_ClearColor = value;
Search WWH ::




Custom Search