Changeset 11589 for code/branches
- Timestamp:
- Nov 27, 2017, 12:42:32 PM (7 years ago)
- Location:
- code/branches/FlappyOrx_HS17
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FlappyOrx_HS17/data/levels/Invaders.oxw
r11509 r11589 48 48 49 49 50 < FlappyOrxCenterPoint name=flappyorxcenter />50 <InvaderCenterPoint name=invadercenter /> 51 51 <?lua 52 52 for i = 1, 30, 1 do -
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrx.cc
r11580 r11589 69 69 sDeathMessage = "Welcome to FlappyOrx"; 70 70 bIsDead = true; 71 multiplier = 1;72 b_combo = false;73 71 this->spawnDistance=200; 74 72 this->tubeOffsetX=500; 75 73 this->setHUDTemplate("FlappyOrxHUD"); 74 firstGame = true; 76 75 } 77 76 … … 225 224 void FlappyOrx::death(){ 226 225 bIsDead = true; 226 firstGame = false; 227 227 228 228 if(point<10) sDeathMessage = DeathMessage10[rand()%(DeathMessage10.size())]; -
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrx.h
r11580 r11589 96 96 bool bShowLevel; 97 97 bool bIsDead; 98 bool firstGame; 98 99 std::string sDeathMessage; 99 100 std::queue<int> tubes; -
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxHUDinfo.cc
r11576 r11589 81 81 } 82 82 else if(this->bShowGameOver_){ 83 std::string message; 84 setTextSize(0.05); 85 switch(messageID){ 86 case 0: 87 message = "Game Over"; 88 setTextSize(0.1); 89 this->setCaption(message); 90 break; 91 case 1: 92 message = this->FlappyOrxGame->sDeathMessage; 93 break; 94 case 2: 95 message = "Your Score: "+multi_cast<std::string>(this->FlappyOrxGame->getPoints())+ 96 " Local High Score: "+multi_cast<std::string>(Highscore::getInstance().getHighestScoreOfGame("Flappy Orx")); 97 break; 98 case 3: 99 message = "Press space to restart."; 100 break; 83 if(this->FlappyOrxGame->firstGame){ 84 if(messageID==3){ 85 setTextSize(0.05); 86 this->setCaption("press space to start"); 87 } 101 88 } 102 this->setCaption(message); 89 else{ 90 std::string message; 91 setTextSize(0.05); 92 switch(messageID){ 93 case 0: 94 message = "Game Over"; 95 setTextSize(0.1); 96 this->setCaption(message); 97 break; 98 case 1: 99 message = this->FlappyOrxGame->sDeathMessage; 100 break; 101 case 2: 102 message = "Your Score: "+multi_cast<std::string>(this->FlappyOrxGame->getPoints())+ 103 " Local High Score: "+multi_cast<std::string>(Highscore::getInstance().getHighestScoreOfGame("Flappy Orx")); 104 break; 105 case 3: 106 message = "Press space to restart."; 107 break; 108 } 109 this->setCaption(message); 110 } 103 111 } 104 112 }
Note: See TracChangeset
for help on using the changeset viewer.