- Timestamp:
- May 13, 2018, 12:39:06 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/3DPacman_FS18/src/modules/pacman/PacmanHUDinfo.cc
r11931 r11958 65 65 if (this->PacmanGame) 66 66 { 67 if(not this->PacmanGame->isDead()){68 67 if(this->bShowPoints_){ 69 68 const std::string& points = "Score: "+multi_cast<std::string>(this->PacmanGame->getPoints()); … … 71 70 this->setCaption(points); 72 71 } 73 else if(this->bShowMessage_){74 setTextSize(0);75 }76 }77 else{78 if(this->bShowPoints_){79 setTextSize(0);80 }81 else if(this->bShowMessage_){82 if(this->PacmanGame->firstGame){83 if(messageID==3){84 setTextSize(0.05);85 this->setCaption("First click, then press space to start");86 }87 }88 else{89 std::string message;90 setTextSize(0.05);91 switch(messageID){92 case 0:93 message = "Game Over";94 setTextSize(0.1);95 this->setCaption(message);96 break;97 case 1:98 message = this->PacmanGame->sDeathMessage;99 break;100 case 2:101 message = "Your Score: "+multi_cast<std::string>(this->PacmanGame->getPoints())+102 " Local High Score: "+multi_cast<std::string>(Highscore::getInstance().getHighestScoreOfGame("Flappy Orx"));103 break;104 case 3:105 time_t time = this->PacmanGame->getPlayer()->timeUntilRespawn();106 if(time<=0)107 message = "Press space to restart.";108 else109 message = "Please wait "+multi_cast<std::string>(time)+" seconds.";110 break;111 }112 this->setCaption(message);113 }114 }115 }116 72 } 117 } 73 } 118 74 119 75 void PacmanHUDinfo::changedOwner()
Note: See TracChangeset
for help on using the changeset viewer.