Changeset 7636 for code/branches/lastmanstanding/src/orxonox
- Timestamp:
- Nov 11, 2010, 1:35:49 AM (14 years ago)
- Location:
- code/branches/lastmanstanding/src/orxonox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/lastmanstanding/src/orxonox/OrxonoxPrereqs.h
r7163 r7636 93 93 class Dynamicmatch; 94 94 class Gametype; 95 class LastManStanding; 95 96 class TeamBaseMatch; 96 97 class TeamDeathmatch; -
code/branches/lastmanstanding/src/orxonox/gametypes/LastManStanding.cc
r7635 r7636 147 147 } 148 148 149 int LastManStanding::pawnGetLives(Pawn* pawn) 150 { 151 if(!pawn) 152 return -1; 153 PlayerInfo* player= dynamic_cast<PlayerInfo*>(pawn); 154 if(!player) 155 return -2; 156 return playerLives_[player]; 157 } 158 159 const int LastManStanding::playerGetLives(PlayerInfo* player) 149 int LastManStanding::playerGetLives(PlayerInfo* player) 160 150 { 161 151 if (player) … … 163 153 else 164 154 return 0; 155 } 156 157 int LastManStanding::getNumPlayersAlive() const 158 { 159 return this->playersAlive; 165 160 } 166 161 -
code/branches/lastmanstanding/src/orxonox/gametypes/LastManStanding.h
r7635 r7636 73 73 74 74 virtual void end(); //!< Sends an end message. 75 virtual int pawnGetLives(Pawn* pawn); //!< Returns amount of Lives of a certain player.76 const int playerGetLives(PlayerInfo* player); //!< getFunction for the map "playerLives_".75 int playerGetLives(PlayerInfo* player); //!< getFunction for the map "playerLives_". 76 int getNumPlayersAlive() const; //!< Returns the number of players that are still alive. 77 77 virtual void playerEntered(PlayerInfo* player); //!< Initializes values. Manages the gametype's HUD. #Players alive via StaticMessage. 78 78 virtual bool playerLeft(PlayerInfo* player); //!< Manages the gametype's HUD. #Players alive via StaticMessage.
Note: See TracChangeset
for help on using the changeset viewer.