Game Development Reference
In-Depth Information
The m_HighScoreTable array holds the actual high score entries.
private HighScoreEntry[] m_HighScoreTable = new HighScoreEntry[MAX_SCORES];
The m_Text variable holds the character set that will be used to print out the text for the high score
table graphics.
private BillBoardCharacterSet m_Text;
The m_FontWidth variable holds the width of each character in the character set that is used to print
text for the high score table.
private int m_FontWidth;
The m_FontHeight variable holds the height of each character in the character set that is used to
print text for the high score table.
private int m_FontHeight;
The m_BackGroundTexture variable holds the texture that is used to clear the high score table texture.
private Texture m_BackGroundTexture;
The m_HighScoreTableImage variable holds a reference to the BillBoard object that contains the
texture with the player's high scores on it.
private BillBoard m_HighScoreTableImage;
The m_Dirty variable is true if the high score table has been altered since the last update and false
otherwise.
private boolean m_Dirty = false;
The HighScoreTable() constructor (see Listing 9-11) creates a new high score table by
1.
Creating a new background texture for the high score table
2.
Initializing the high score table by creating blank high score entries in the
m_HighScoreTable array
3.
Initializing other class member variables
4.
Loading in the player's previously saved high scores, if any
Listing 9-11. The HighScoreTable Constructor
HighScoreTable(Context iContext,BillBoardCharacterSet CharacterSet,BillBoard HighScoreTableImage)
{
m_Context = iContext;
m_BackGroundTexture = new Texture(iContext, R.drawable.background);
 
Search WWH ::




Custom Search