Changeset 3104
- Timestamp:
- May 28, 2009, 5:37:34 AM (15 years ago)
- Location:
- code/trunk/src/orxonox
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/objects/gametypes/TeamBaseMatch.cc
r3103 r3104 46 46 this->pointsTeam1_ = 0; 47 47 this->pointsTeam2_ = 0; 48 49 this->setHUDTemplate("TeamBaseMatchHUD"); 48 50 } 49 51 … … 54 56 if (base) 55 57 { 56 if ( !originator)58 if (!originator) 57 59 return false; 60 58 61 std::set<TeamBaseMatchBase*>::const_iterator it = this->bases_.find(base); 59 62 if (it != this->bases_.end()) … … 217 220 } 218 221 222 int TeamBaseMatch::getTeamPoints(int team) 223 { 224 if(team == 0) 225 { 226 return this->pointsTeam1_; 227 } 228 if(team == 1) 229 { 230 return this->pointsTeam2_; 231 } 232 233 return 0; 234 } 235 236 int TeamBaseMatch::getTeamBases(int team) 237 { 238 int count = 0; 239 240 for (std::set<TeamBaseMatchBase*>::const_iterator it = this->bases_.begin(); it != this->bases_.end(); ++it) 241 { 242 if ((*it)->getState() == BaseState::controlTeam1 && team == 0) 243 count++; 244 if ((*it)->getState() == BaseState::controlTeam2 && team == 1) 245 count++; 246 } 247 248 return count; 249 } 250 219 251 void TeamBaseMatch::addBase(TeamBaseMatchBase* base) 220 252 { -
code/trunk/src/orxonox/objects/gametypes/TeamBaseMatch.h
r3033 r3104 55 55 56 56 void addTeamPoints(int team, int points); 57 int getTeamPoints(int team); 58 int getTeamBases(int team); 57 59 58 60 protected: -
code/trunk/src/orxonox/objects/gametypes/UnderAttack.cc
r3099 r3104 49 49 this->destroyer_ = 0; 50 50 this->gameEnded_ = false; 51 52 this->setHUDTemplate("UnderAttackHUD"); 51 53 52 54 this->setConfigValues(); -
code/trunk/src/orxonox/overlays/hud/CMakeLists.txt
r3099 r3104 12 12 DeathMessage.cc 13 13 PongScore.cc 14 UnderAttackHealthBar.cc 15 TeamBaseMatchScore.cc 14 16 )
Note: See TracChangeset
for help on using the changeset viewer.