- Timestamp:
- Sep 23, 2010, 11:22:22 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/lastmanstanding/src/orxonox/gametypes/LastManStanding.h
r7480 r7485 31 31 */ 32 32 /* BY THE WAY 33 //You have to add bots (or any other further players) before actually starting a match. 33 //!You have to ADD BOTS (or any other further players) BEFORE actually starting a match! 34 //Maybe a warning should be added in the menu, if a player starts a Last Man Standing match alone. 34 35 //Whenever there is only on player in the game, this player will be declared as winner. 35 //How "death" is managed: Death players become invisivle and aren't allowed to damage any player. 36 //Though they can recieve damage and they are not invisible on the radar- 36 //How "death" is managed: dead players cannot respawn. 37 37 */ 38 38 #ifndef _LastManStanding_H__ … … 55 55 */ 56 56 protected: 57 int lives; //!< Standard amount of lives. 57 int lives; //!< Standard amount of lives. Each player starts a game with so many lives. 58 58 std::map< PlayerInfo*, int > playerLives_; //!< Each player's lives are stored here. 59 59 int playersAlive; //!< Counter counting players with more than 0 lives. 60 60 float timeRemaining; //!< Each player has a certain time where he or she has to hit an opponent or will be punished. 61 61 std::map<PlayerInfo*, float> timeToAct_; //!< Each player's time till she/he will be punished is stored here. 62 virtual void spawnDeadPlayersIfRequested(); 62 63 63 64 public: … … 66 67 void setConfigValues(); //!< Makes values configurable. 67 68 68 virtual bool allowPawnHit(Pawn* victim, Pawn* originator = 0); //!< Prevents hits by players with no lives. 69 virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = 0); //!< If a player shoot's an opponet, his punishment countdown will be resetted. Prevents damage by players with no lives. 69 virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = 0); //!< If a player shoot's an opponet, his punishment countdown will be resetted. 70 70 virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = 0); //!< Manages each lives. 71 71 … … 76 76 virtual bool playerChangedName(PlayerInfo* player); 77 77 78 virtual void playerStartsControllingPawn(PlayerInfo* player, Pawn* pawn);//makes dead players invisible79 virtual void pawnPostSpawn(Pawn* pawn); //just for test case80 78 virtual void pawnKilled(Pawn* victim, Pawn* killer = 0); 81 79 82 80 const int playerGetLives(PlayerInfo* player); 83 81 void killPlayer(PlayerInfo* player); 84 //void removePlayer(PlayerInfo* player);85 82 void tick (float dt);// used to end the game 86 83 };
Note: See TracChangeset
for help on using the changeset viewer.