Changeset 7635 for code/branches/lastmanstanding/src/orxonox
- Timestamp:
- Nov 10, 2010, 9:59:50 PM (15 years ago)
- Location:
- code/branches/lastmanstanding/src/orxonox/gametypes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/lastmanstanding/src/orxonox/gametypes/LastManStanding.cc
r7617 r7635 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) 160 { 161 if (player) 162 return playerLives_[player]; 163 else 164 return 0; 165 } 149 166 150 167 void LastManStanding::playerEntered(PlayerInfo* player) … … 224 241 } 225 242 226 const int LastManStanding::playerGetLives(PlayerInfo* player)227 {228 if (player)229 return playerLives_[player];230 else231 return 0;232 }233 234 243 void LastManStanding::punishPlayer(PlayerInfo* player) 235 244 { -
code/branches/lastmanstanding/src/orxonox/gametypes/LastManStanding.h
r7617 r7635 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 77 virtual void playerEntered(PlayerInfo* player); //!< Initializes values. Manages the gametype's HUD. #Players alive via StaticMessage. 76 78 virtual bool playerLeft(PlayerInfo* player); //!< Manages the gametype's HUD. #Players alive via StaticMessage. … … 78 80 virtual void playerStopsControllingPawn(PlayerInfo* player, Pawn* pawn); //!< Manages the gametype's HUD. #Players alive via StaticMessage. 79 81 80 const int playerGetLives(PlayerInfo* player); //!< getFunction for the map "playerLives_".81 82 void punishPlayer(PlayerInfo* player); //!< Function in order to kill a player. Punishment for hiding longer than "timeRemaining". 82 83 void tick (float dt); //!< used to end the game
Note: See TracChangeset
for help on using the changeset viewer.