- Timestamp:
- May 16, 2019, 7:16:49 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc
r12394 r12395 112 112 } 113 113 */ 114 115 for (OrxoBloxStones* stone : ObjectList<OrxoBloxStones>()) { 116 if(stone != nullptr) 117 stone->destroy(); 118 } 119 120 114 121 for (OrxoBloxWall* wall : this->activeWalls_) { 115 122 if (wall != nullptr) … … 117 124 } 118 125 this->activeWalls_.clear(); 119 120 121 for (OrxoBloxStones* stone : this->stones_) { 122 if(stone != nullptr) 123 stone->destroy(); 124 } 126 125 127 this->stones_.clear(); 126 128 if(this->playership != nullptr) { … … 189 191 // Call end for the parent class. 190 192 Deathmatch::end(); 191 GSLevel::startMainMenu();193 //GSLevel::startMainMenu(); 192 194 } 193 195 … … 214 216 215 217 orxout() << "level up called" << endl; 216 //this->playerScored(this->player_);// add points218 this->playerScored(this->player_);// add points 217 219 218 220 this->createWall(); 219 221 this->activeWalls_.push_back(this->futureWall_); 220 /*for (int i = 0; i < this->futureWall_->getNumberOfStones(); i++) {222 for (int i = 0; i < this->futureWall_->getNumberOfStones(); i++) { 221 223 this->stones_.push_back(this->futureWall_->getStone(i)); 222 } */224 } 223 225 224 226 for(OrxoBloxWall* wall : this->activeWalls_) { … … 244 246 //create balls 245 247 //insert new wall 246 for(OrxoBloxStones* stone : this->stones_){247 if (stone != nullptr) {248 for(OrxoBloxStones* stone : ObjectList<OrxoBloxStones>()){ 249 if (stone->isA(Class(OrxoBloxStones))) { 248 250 int x_=(stone->getPosition()).x; 249 251 int y_=(stone->getPosition()).y; … … 256 258 this->end(); 257 259 } 260 } 261 else { 262 stone = nullptr; 258 263 } 259 264 } … … 341 346 */ 342 347 void OrxoBlox::count() { 343 if( this->counter>= this->max_counter) {348 if(++(this->counter) >= this->max_counter) { 344 349 this->LevelUp(); 345 350 counter = 0; 346 351 return; 347 352 } 348 else {349 this->counter++;350 }351 353 } 352 354
Note: See TracChangeset
for help on using the changeset viewer.