- Timestamp:
- Dec 4, 2017, 4:17:43 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DHUDinfo.cc
r11608 r11637 41 41 42 42 this->Asteroids2DGame = nullptr; 43 this->Ship = nullptr; 43 44 this->bShowPoints_ = true; 45 this->bShowHealth_ = true; 44 46 } 45 47 … … 49 51 50 52 XMLPortParam(Asteroids2DHUDinfo,"showPoints", setShowPoints, getShowPoints, xmlelement, mode).defaultValues(false); 53 XMLPortParam(Asteroids2DHUDinfo,"showHealth", setShowHealth, getShowHealth, xmlelement, mode).defaultValues(false); 51 54 } 52 55 … … 74 77 } 75 78 } 79 80 /*if(this->bShowHealth_) 81 { 82 const std::string& health = multi_cast<std::string>(this->Ship->getHealth()); 83 if (this->Asteroids2DGame->lives <= 0) 84 { 85 setTextSize(0.2); 86 setPosition(Vector2(0.1, 0.02)); 87 this->setCaption("Final score:\n" + health); 88 this->setColour(ColourValue(1, 0, 0, 1)); 89 } 90 else 91 { 92 setTextSize(0.04); 93 setPosition(Vector2(0.2, 0.02)); 94 this->setColour(ColourValue(1, 1, 1, 1)); 95 this->setCaption(health); 96 } 97 }*/ 76 98 } 77 99 … … 80 102 SUPER(Asteroids2DHUDinfo, changedOwner); 81 103 82 if (this->getOwner() && this->getOwner()->getGametype()) 104 if (this->getOwner() && this->getOwner()->getGametype())//&& this->getOwner->getPlayer()) 83 105 { 84 106 this->Asteroids2DGame = orxonox_cast<Asteroids2D*>(this->getOwner()->getGametype()); 107 //this->Ship = orxonox_cast<Asteroids2DShip*>(this->getOwner()->getPlayer()); 85 108 } 86 109 else
Note: See TracChangeset
for help on using the changeset viewer.