- Timestamp:
- May 9, 2019, 3:29:29 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc
r12355 r12359 170 170 171 171 // Set variable to temporarily force the player to spawn. 172 // Set variable to temporarily force the player to spawn. 173 bool temp = this->bForceSpawn_; 172 174 this->bForceSpawn_ = true; 173 175 … … 175 177 Deathmatch::start(); 176 178 179 // Reset the variable. 180 this->bForceSpawn_ = temp; 181 177 182 } 178 183 … … 184 189 { 185 190 ChatManager::message("You suck!!"); 191 192 if (Highscore::exists()) 193 { 194 int score = this->getScore(this->getPlayer()); 195 Highscore::getInstance().storeScore("Tetris", score, this->getPlayer()); 196 } 197 186 198 this->cleanup(); 187 199 … … 191 203 } 192 204 193 OrxoBloxShip* OrxoBlox::getPlayer() 194 { 195 if (playership == nullptr) 196 { 197 for (OrxoBloxShip* ship_ : ObjectList<OrxoBloxShip>()) 198 { 199 playership = ship_; 200 } 201 } 202 return playership; 205 PlayerInfo* OrxoBlox::getPlayer() 206 { 207 return this->player_; 203 208 } 204 209 … … 217 222 void OrxoBlox::LevelUp(){ 218 223 level_++; 219 224 this->playerScored(this->player_);// add points 220 225 for(OrxoBloxStones* stone : this->stones_){ 221 226 int x_=(stone->getPosition()).x;
Note: See TracChangeset
for help on using the changeset viewer.