예제 #1
0
/*
	initText - Provides an example of how to render text to our screen every frame,
	allowing for the text to continually change. This method adds a text object
	to the text manager (GameText), which allows it to be updated each frame. This
	method should be called only once for each object.
*/
void DummyTextGenerator::initText(Game *game)
{
	// FIRST UPDATE THE TEXT THIS GENERATOR IS USING
	appendTargetFPS(game);

	// AND THEN HAND IT TO THE TEXT MANAGER, SPECIFYING WHERE IT SHOULD BE RENDERED
	GameText *text = game->getText();
	text->addText(&textToGenerate, 350, 50, game->getGraphics()->getScreenWidth(), game->getGraphics()->getScreenHeight());
}
/*
	initText - Provides an example of how to render text to our screen every frame,
	allowing for the text to continually change. This method adds a text object
	to the text manager (GameText), which allows it to be updated each frame. This
	method should be called only once for each object.
*/
void BalloonEscapeTextGenerator::initText(Game *game)
{
    // FIRST UPDATE THE TEXT THIS GENERATOR IS USING
    appendMouseCoords(game);

    // AND THEN HAND IT TO THE TEXT MANAGER, SPECIFYING WHERE IT SHOULD BE RENDERED
    GameText *text = game->getText();
    text->addText(&textToGenerate, W_TEXT_X, W_TEXT_Y, game->getGraphics()->getScreenWidth(), game->getGraphics()->getScreenHeight());
}
/*
	initText - Provides an example of how to render text to our screen every frame,
	allowing for the text to continually change. This method adds a text object
	to the text manager (GameText), which allows it to be updated each frame. This
	method should be called only once for each object.
*/
void StraightLineRPGTextGenerator::initText(Game *game)
{
	// FIRST UPDATE THE TEXT THIS GENERATOR IS USING
	appendPlayerHealth(game);

	// AND THEN HAND IT TO THE TEXT MANAGER, SPECIFYING WHERE IT SHOULD BE RENDERED
	GameText *text = game->getText();
	text->addText(&textHealth, W_TEXT_X, W_TEXT_Y, game->getGraphics()->getScreenWidth(), game->getGraphics()->getScreenHeight());

	appendPlayerMP(game);
	text->addText(&textMP, W_TEXT_P_MP_X, W_TEXT_P_MP_Y, game->getGraphics()->getScreenWidth(), game->getGraphics()->getScreenHeight());

	appendPlayerStr(game);
	text->addText(&textStr, W_TEXT_P_STR_X, W_TEXT_P_STR_Y, game->getGraphics()->getScreenWidth(), game->getGraphics()->getScreenHeight());

	appendPlayerDef(game);
	text->addText(&textDefense, W_TEXT_P_DEF_X, W_TEXT_P_DEF_Y, game->getGraphics()->getScreenWidth(), game->getGraphics()->getScreenHeight());
}
예제 #4
0
void OdysseyTextGenerator::initText(Game *game)
{
	GameText *text = game->getText();
	text->addText(&W_SPALSH_TEXT, 400, 350, game->getGraphics()->getScreenWidth(), game->getGraphics()->getScreenHeight());
	text->addText(&W_MAIN_TEXT_1, 430, 350, game->getGraphics()->getScreenWidth(), game->getGraphics()->getScreenHeight());
	text->addText(&W_MAIN_TEXT_2, 455, 370, game->getGraphics()->getScreenWidth(), game->getGraphics()->getScreenHeight());
	text->addText(&W_MAIN_TEXT_3, 455, 390, game->getGraphics()->getScreenWidth(), game->getGraphics()->getScreenHeight());
	text->addText(&W_MAIN_TEXT_4, 475, 410, game->getGraphics()->getScreenWidth(), game->getGraphics()->getScreenHeight());
	text->addText(&textToGenerate, 500, 2, game->getGraphics()->getScreenWidth(), game->getGraphics()->getScreenHeight());
	text->addText(&W_PAUSE_TEXT_1, 500, 610, game->getGraphics()->getScreenWidth(), game->getGraphics()->getScreenHeight());
	text->addText(&W_PAUSE_TEXT_2, 500, 640, game->getGraphics()->getScreenWidth(), game->getGraphics()->getScreenHeight());
	text->addText(&W_CONT_TEXT, 500, 550, game->getGraphics()->getScreenWidth(), game->getGraphics()->getScreenHeight());
	text->addText(&W_GAME_OVER_QUIT, 500, 570, game->getGraphics()->getScreenWidth(), game->getGraphics()->getScreenHeight());

}