- Timestamp:
- Nov 20, 2017, 1:06:08 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxHUDinfo.cc
r11533 r11563 45 45 this->bShowPoints_ = false; 46 46 this->bShowMultiplier_ = false; 47 this->bShowGameOver_ = false; 48 this->sGameOverMessage_ = ""; 47 49 } 48 50 … … 52 54 53 55 XMLPortParam(FlappyOrxHUDinfo, "showlives", setShowLives, getShowLives, xmlelement, mode).defaultValues(false); 54 XMLPortParam(FlappyOrxHUDinfo, "showPoints", setShowPoints, getShowPoints, xmlelement, mode).defaultValues(false); 56 XMLPortParam(FlappyOrxHUDinfo, "showpoints", setShowPoints, getShowPoints, xmlelement, mode).defaultValues(false); 57 XMLPortParam(FlappyOrxHUDinfo, "showmessage", setShowMessage, getShowMessage, xmlelement, mode).defaultValues(false); 55 58 56 59 … … 71 74 { 72 75 const std::string& points = multi_cast<std::string>(this->FlappyOrxGame->getPoints()); 73 if (this->FlappyOrxGame->lives <= 0) 74 { 75 setTextSize(0.2); 76 setPosition(Vector2(0.1, 0.02)); 77 this->setCaption("Final score:\n" + points); 78 this->setColour(ColourValue(1, 0, 0, 1)); 79 } 80 else 76 if (not this->FlappyOrxGame->isDead()) 81 77 { 82 78 setTextSize(0.04); … … 85 81 this->setCaption(points); 86 82 } 83 } 84 if(this->bShowGameOver_){ 85 if(this->FlappyOrxGame->isDead()){ 86 std::string message = this->FlappyOrxGame->getDeathMessage(); 87 setTextSize(0.4); 88 setPosition(Vector2(.5, .5)); 89 this->setCaption(message); 90 this->setColour(ColourValue(1, 0, 0, 1)); 91 } 92 87 93 } 88 94
Note: See TracChangeset
for help on using the changeset viewer.