Changeset 10181 for code/branches/presentationHS14/src/modules/towerdefense/TowerDefenseHUDController.cc
- Timestamp:
- Dec 15, 2014, 3:58:14 PM (10 years ago)
- Location:
- code/branches/presentationHS14
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentationHS14
- Property svn:mergeinfo changed
/code/branches/towerdefenseHS14 (added) merged: 10086,10091,10105-10106,10109,10123,10125-10126,10132,10134,10140-10142,10144,10146-10147,10151,10158-10159,10172
- Property svn:mergeinfo changed
-
code/branches/presentationHS14/src/modules/towerdefense/TowerDefenseHUDController.cc
r9667 r10181 32 32 #include "util/Convert.h" 33 33 34 35 34 namespace orxonox 36 35 { … … 40 39 { 41 40 RegisterObject(TowerDefenseHUDController); 41 this->td = 0; 42 42 } 43 43 … … 50 50 { 51 51 SUPER(TowerDefenseHUDController, tick, dt); 52 const std::string& lifes = multi_cast<std::string>(this->td->getLifes()); 53 const std::string& credits = multi_cast<std::string>(this->td->getCredit()); 54 const std::string& wave = multi_cast<std::string>(this->td->getWaveNumber()); 55 56 if(showlives == true) 57 this->setCaption(multi_cast<std::string>(lifes)); 58 else if(showcredits == true) 59 this->setCaption(multi_cast<std::string>(credits)); 60 else if(showwaves == true) 61 this->setCaption(multi_cast<std::string>(wave)); 62 63 52 64 } 53 65 … … 55 67 { 56 68 SUPER(TowerDefenseHUDController, XMLPort, xmlelement, mode); 69 70 XMLPortParam(TowerDefenseHUDController, "showlives", setShowlives, getShowlives, xmlelement, mode); 71 XMLPortParam(TowerDefenseHUDController, "showcredits", setShowcredits, getShowcredits, xmlelement, mode); 72 XMLPortParam(TowerDefenseHUDController, "showwaves", setShowwaves, getShowwaves, xmlelement, mode); 73 57 74 } 58 75 59 76 void TowerDefenseHUDController::changedOwner() 60 { 61 SUPER(TowerDefenseHUDController, changedOwner); 62 /* 63 if (this->getOwner() != NULL && this->getOwner()->getGametype()) 64 this->owner_ = orxonox_cast<Pong*>(this->getOwner()->getGametype().get()); 65 else 66 this->owner_ = 0; 67 */ 68 } 77 { 78 SUPER(TowerDefenseHUDController, changedOwner); 69 79 70 } 80 if (this->getOwner() && this->getOwner()->getGametype()) 81 { 82 this->td = orxonox_cast<TowerDefense*>(this->getOwner()->getGametype().get()); 83 } 84 else 85 { 86 this->td = 0; 87 } 88 } 89 } 90
Note: See TracChangeset
for help on using the changeset viewer.