Game Development Reference
In-Depth Information
m_CharacterSetTextures[17] = new Texture(iContext, R.drawable.charseth);
m_CharacterSetTextures[18] = new Texture(iContext, R.drawable.charseti);
m_CharacterSetTextures[19] = new Texture(iContext, R.drawable.charsetj);
m_CharacterSetTextures[20] = new Texture(iContext, R.drawable.charsetk);
m_CharacterSetTextures[21] = new Texture(iContext, R.drawable.charsetl);
m_CharacterSetTextures[22] = new Texture(iContext, R.drawable.charsetm);
m_CharacterSetTextures[23] = new Texture(iContext, R.drawable.charsetn);
m_CharacterSetTextures[24] = new Texture(iContext, R.drawable.charseto);
m_CharacterSetTextures[25] = new Texture(iContext, R.drawable.charsetp);
m_CharacterSetTextures[26] = new Texture(iContext, R.drawable.charsetq);
m_CharacterSetTextures[27] = new Texture(iContext, R.drawable.charsetr);
m_CharacterSetTextures[28] = new Texture(iContext, R.drawable.charsets);
m_CharacterSetTextures[29] = new Texture(iContext, R.drawable.charsett);
m_CharacterSetTextures[30] = new Texture(iContext, R.drawable.charsetu);
m_CharacterSetTextures[31] = new Texture(iContext, R.drawable.charsetv);
m_CharacterSetTextures[32] = new Texture(iContext, R.drawable.charsetw);
m_CharacterSetTextures[33] = new Texture(iContext, R.drawable.charsetx);
m_CharacterSetTextures[34] = new Texture(iContext, R.drawable.charsety);
m_CharacterSetTextures[35] = new Texture(iContext, R.drawable.charsetz);
// Debug Symbols
m_CharacterSetTextures[36] = new Texture(iContext, R.drawable.charsetcolon);
m_CharacterSetTextures[37] = new Texture(iContext, R.drawable.charsetsemicolon);
m_CharacterSetTextures[38] = new Texture(iContext, R.drawable.charsetcomma);
m_CharacterSetTextures[39] = new Texture(iContext, R.drawable.charsetequals);
m_CharacterSetTextures[40] = new Texture(iContext, R.drawable.charsetleftparen);
m_CharacterSetTextures[41] = new Texture(iContext, R.drawable.charsetrightparen);
m_CharacterSetTextures[42] = new Texture(iContext, R.drawable.charsetdot);
}
The SetUpHUDComposite() function initializes m_HUDComposite as a BillBoard object that will be used
in the creation of a HUD item. The m_HUDComposite will be displaying the actual score or health level
of the player. (See Listing 6-38.)
Listing 6-38. Setting Up a BillBoard Object for Use with a HUD Item
void SetUpHUDComposite(Context iContext)
{
m_HUDTexture = new Texture(iContext, R.drawable.hud);
Shader Shader = new Shader(iContext, R.raw.vsonelight, R.raw.fsonelight); // ok
MeshEx Mesh = new MeshEx(8,0,3,5,Cube.CubeData, Cube.CubeDrawOrder);
// Create Material for this object
Material Material1 = new Material();
Material1.SetEmissive(1.0f, 1.0f, 1.0f);
Texture[] Tex = new Texture[1];
Tex[0] = m_HUDTexture;
m_HUDComposite = new BillBoard(iContext, Mesh, Tex, Material1, Shader);
 
Search WWH ::




Custom Search