Exemplo n.º 1
0
/*
	renderText - This method will go through the GameText argument,
	pull out each TextToDraw object, and use a technology-specific
	method in a child class, renderTextToDraw, to render each
	piece of text.
*/
void GameGraphics::renderText(GameText *text)
{
	if (debugTextShouldBeRendered)
	{
		int numTextObjects = text->getNumTextObjectsToDraw();
		for (int i = 0; i < numTextObjects; i++)
		{
			TextToDraw *textToDraw = text->getTextToDrawAtIndex(i);
			renderTextToDraw(textToDraw);
		}
	}
}
Exemplo n.º 2
0
/*
	renderText - This method will go through the GameText argument,
	pull out each TextToDraw object, and use a technology-specific
	method in a child class, renderTextToDraw, to render each
	piece of text.
*/
void GameGraphics::renderText(GameText *text)
{
    // FOR NOW WE ONLY USE TEXT RENDERING FOR DEBUG TEXT, BUT
    // IT COULD ALSO BE USED FOR GAME TEXT LIKE HEALTH STATS
    if (game->getGSM()->getCurrentGameState()==GS_GAME_IN_PROGRESS)
    {
        int numTextObjects = text->getNumTextObjectsToDraw();
        for (int i = 0; i < numTextObjects; i++)
        {
            TextToDraw *textToDraw = text->getTextToDrawAtIndex(i);
            renderTextToDraw(textToDraw);
        }
    }
}
Exemplo n.º 3
0
/*
	renderText - This method will go through the GameText argument,
	pull out each TextToDraw object, and use a technology-specific
	method in a child class, renderTextToDraw, to render each
	piece of text.
*/
void GameGraphics::renderText(GameText *text)
{
	// FOR NOW WE ONLY USE TEXT RENDERING FOR DEBUG TEXT, BUT
	// IT COULD ALSO BE USED FOR GAME TEXT LIKE HEALTH STATS
	if (debugTextShouldBeRendered)
	{
		int numTextObjects = text->getNumTextObjectsToDraw();
		for (int i = 0; i < numTextObjects; i++)
		{
			TextToDraw *textToDraw = text->getTextToDrawAtIndex(i);
			renderTextToDraw(textToDraw);
		}
	}
}