//------------------------------ void GameStatusDisplay::draw(void){ if (show3dfont) draw3dFont(); else draw2dFont(); }
//------------------------------ void GameStatusDisplay::draw(void){ if (show3dfont) draw3dFont(); else draw2dFont(); if (displayGameOver) { //game over if ((ofGetElapsedTimeMillis() - SplashScreenTimer) < SplashScreenDuration){ cam.begin(); MediaUtils::billboardBegin();//always facing the camera { ofScale(1, -1, 1); // Flip back since we're in 3D. //font.drawString(str, font.stringWidth(str) * -0.5f, font.stringHeight(str) * 0.5f); ofSetColor(5, 200, 220); string GOstr = "GAME OVER"; fontMedium.drawString(GOstr, GOstartPositionX, GOstartPositionY); } MediaUtils::billboardEnd(); cam.end(); } else { displayGameOver = false; displayNewGame = true; SplashScreenTimer = ofGetElapsedTimeMillis(); } } else if (displayNewGame) { // new game if ((ofGetElapsedTimeMillis() - SplashScreenTimer) < SplashScreenDuration){ cam.begin(); MediaUtils::billboardBegin();//always facing the camera { ofScale(1, -1, 1); // Flip back since we're in 3D. //font.drawString(str, font.stringWidth(str) * -0.5f, font.stringHeight(str) * 0.5f); ofSetColor(5, 200, 220); string GOstr = "NEW GAME"; fontMedium.drawString(GOstr, GOstartPositionX, GOstartPositionY); GOstr = "PRESS A BUTTON"; fontMedium.drawString(GOstr, GOstartPositionX, GOstartPositionY + 50); } MediaUtils::billboardEnd(); cam.end(); } else { displayNewGame = false; } } }