Changeset 7635 for code/branches/lastmanstanding
- Timestamp:
- Nov 10, 2010, 9:59:50 PM (14 years ago)
- Location:
- code/branches/lastmanstanding
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/lastmanstanding/data/overlays/lastmanstandinghud.oxo
r7581 r7635 20 20 align = "center" 21 21 /> 22 <!--LastManStandingInfos 23 position = "0.63, 0.05" 24 pickpoint = "0.0, 0.0" 25 font = "ShareTechMono" 26 textsize = 0.04 27 colour = "0.8, 0.8, 1.0, 1.0" 28 align = "right" 29 30 showlives = true 31 showplayers = false 32 /--> 33 34 <OverlayText 35 position = "0.02, 0.02" 36 pickpoint = "0.0, 0.0" 37 font = "ShareTechMono" 38 textsize = 0.04 39 colour = "1.0, 1.0, 1.0, 1.0" 40 align = "left" 41 caption = "Lives: " 42 /> 43 44 <OverlayText 45 position = "0.02, 0.055" 46 pickpoint = "0.0, 0.0" 47 font = "ShareTechMono" 48 textsize = 0.04 49 colour = "1.0, 1.0, 1.0, 1.0" 50 align = "left" 51 caption = "Players: " 52 /> 53 54 <OverlayText 55 position = "0.02, 0.07" 56 pickpoint = "0.0, 0.0" 57 font = "ShareTechMono" 58 textsize = 0.04 59 colour = "1.0, 1.0, 1.0, 1.0" 60 align = "left" 61 caption = "__________|" 62 /> 63 64 <OverlayText 65 position = "0.022, 0.07" 66 pickpoint = "0.0, 0.0" 67 font = "ShareTechMono" 68 textsize = 0.04 69 colour = "1.0, 1.0, 1.0, 1.0" 70 align = "left" 71 caption = "__________" 72 /> 73 74 <OverlayText 75 position = "0.1733, 0.038" 76 pickpoint = "0.0, 0.0" 77 font = "ShareTechMono" 78 textsize = 0.04 79 colour = "1.0, 1.0, 1.0, 1.0" 80 align = "left" 81 caption = "|" 82 /> 83 22 84 </OverlayGroup> 23 85 </Template> -
code/branches/lastmanstanding/src/modules/overlays/hud/CMakeLists.txt
r7163 r7635 15 15 GametypeStaticMessage.cc 16 16 GametypeFadingMessage.cc 17 LastManStandingInfos.cc 17 18 ) -
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.