Changeset 11961 for code/branches/3DPacman_FS18/src/modules/pacman
- Timestamp:
- May 14, 2018, 1:08:06 PM (6 years ago)
- Location:
- code/branches/3DPacman_FS18/src/modules/pacman
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/3DPacman_FS18/src/modules/pacman/PacmanHUDinfo.cc
r11958 r11961 45 45 this->bShowPoints_ = false; 46 46 this->bShowMessage_ = false; 47 this->bShowGhoststatus_ = false; 47 48 this->messageID = 0; 49 48 50 } 49 51 … … 54 56 XMLPortParam(PacmanHUDinfo, "showpoints", setShowPoints, getShowPoints, xmlelement, mode).defaultValues(false); 55 57 XMLPortParam(PacmanHUDinfo, "showmessage", setShowMessage, getShowMessage, xmlelement, mode).defaultValues(false); 58 XMLPortParam(PacmanHUDinfo, "showghoststatus", setGhoststatus, getGhoststatus, xmlelement, mode).defaultValues(false); 56 59 XMLPortParam(PacmanHUDinfo, "messageID", setMessageID, getMessageID, xmlelement, mode).defaultValues(0); 57 60 … … 66 69 { 67 70 if(this->bShowPoints_){ 68 const std::string& points = " Score: "+multi_cast<std::string>(this->PacmanGame->getPoints());71 const std::string& points = "Collected points: "+multi_cast<std::string>(this->PacmanGame->getPoints()) + " of " + multi_cast<std::string>(this->PacmanGame->totallevelpoint); 69 72 setTextSize(0.04); 70 73 this->setCaption(points); 74 } 75 if(this->bShowGhoststatus_){ 76 const std::string& ghoststatus = "Do not get caught!"; 77 //if(this->PacmanGame->afraid) const std::string& ghoststatus = "Catch the ghosts!"; 78 orxout() << "Test Hier" << endl; 79 setTextSize(0.04); 80 this->setCaption(ghoststatus); 71 81 } 72 82 } -
code/branches/3DPacman_FS18/src/modules/pacman/PacmanHUDinfo.h
r11931 r11961 63 63 { return messageID; } 64 64 65 inline void setGhoststatus(int value){ 66 this->bShowGhoststatus_ = value; 67 } 68 inline int getGhoststatus() const 69 { return this->bShowGhoststatus_; } 70 65 71 private: 66 72 Pacman* PacmanGame; 67 73 bool bShowPoints_; 68 74 bool bShowMessage_; 75 bool bShowGhoststatus_; 69 76 int messageID; 70 77 };
Note: See TracChangeset
for help on using the changeset viewer.