- Timestamp:
- Jun 25, 2006, 10:26:54 AM (18 years ago)
- Location:
- branches/network/src/util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/util/multiplayer_team_deathmatch.cc
r8739 r8772 72 72 this->table = NULL; 73 73 this->statsBox = NULL; 74 75 this->deathScreen = new ImagePlane();76 this->deathScreen->setSize(State::getResX()/4.0, State::getResY()/4.0);77 this->deathScreen->setAbsCoor2D(State::getResX()/2.0f, State::getResY()/2.0f);78 this->deathScreen->setVisibility(false);79 74 80 75 this->localPlayer = State::getPlayer(); … … 103 98 MultiplayerTeamDeathmatch::~MultiplayerTeamDeathmatch() 104 99 { 105 if( this->deathScreen)106 delete this->deathScreen;107 108 100 unsubscribeEvent( ES_GAME, SDLK_o ); 109 101 unsubscribeEvent( ES_GAME, SDLK_TAB ); … … 136 128 .describe("sets the maximal kills for winning condition"); 137 129 138 LoadParam(root, "death-screen-image", this, MultiplayerTeamDeathmatch, setDeathScreen)139 .describe("sets the death screen image");140 141 130 LoadParam(root, "num-teams", this, MultiplayerTeamDeathmatch, setNumTeams) 142 131 .describe("sets number of teams"); … … 145 134 146 135 147 148 void MultiplayerTeamDeathmatch::setDeathScreen(const std::string& imageName)149 {150 if( this->deathScreen)151 this->deathScreen->setTexture(imageName);152 }153 154 155 156 136 /** 157 137 * called when the player enters the game … … 161 141 { 162 142 this->bLocalPlayerDead = false; 163 this->deathScreen->setVisibility(false);164 143 } 165 144 … … 172 151 { 173 152 this->bLocalPlayerDead = true; 174 this->deathScreen->setVisibility(true);175 153 } 176 154 -
branches/network/src/util/multiplayer_team_deathmatch.h
r8739 r8772 50 50 inline void setDeathPenaltyTimeout(float time) { this->deathTimeout = time; } 51 51 inline void setMaxKills(int kills) { this->maxKills = kills; } 52 void setDeathScreen(const std::string& imageName);53 52 54 53 inline void setNumTeams( int numTeams ){ this->numTeams = numTeams; } … … 73 72 74 73 std::map<int,int> teamScore; //!< team score 75 76 ImagePlane* deathScreen; //!< the death screen77 74 78 75 int currentGameState; //!< game state
Note: See TracChangeset
for help on using the changeset viewer.