Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 16, 2019, 7:16:49 PM (5 years ago)
Author:
pomselj
Message:

kinda done

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc

    r12394 r12395  
    112112            }
    113113        */
     114
     115        for (OrxoBloxStones* stone : ObjectList<OrxoBloxStones>()) {
     116            if(stone != nullptr)
     117            stone->destroy();
     118        }
     119
     120
    114121        for (OrxoBloxWall* wall : this->activeWalls_) {
    115122            if (wall != nullptr)
     
    117124        }
    118125        this->activeWalls_.clear();
    119        
    120 
    121         for (OrxoBloxStones* stone : this->stones_) {
    122             if(stone != nullptr)
    123             stone->destroy();
    124         }
     126
    125127        this->stones_.clear();
    126128        if(this->playership != nullptr) {
     
    189191        // Call end for the parent class.
    190192        Deathmatch::end();
    191         GSLevel::startMainMenu();
     193        //GSLevel::startMainMenu();
    192194    }
    193195
     
    214216
    215217        orxout() << "level up called" << endl;
    216         //this->playerScored(this->player_);// add points
     218        this->playerScored(this->player_);// add points
    217219
    218220        this->createWall();
    219221        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++) {
    221223            this->stones_.push_back(this->futureWall_->getStone(i));
    222         }*/
     224        }
    223225
    224226        for(OrxoBloxWall* wall : this->activeWalls_) {
     
    244246        //create balls
    245247        //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))) {
    248250                int x_=(stone->getPosition()).x;
    249251                int y_=(stone->getPosition()).y;
     
    256258                    this->end();
    257259                }
     260            }
     261            else {
     262                stone = nullptr;
    258263            }
    259264        }
     
    341346  */ 
    342347    void OrxoBlox::count() {
    343         if(this->counter >= this->max_counter) {
     348        if(++(this->counter) >= this->max_counter) {
    344349            this->LevelUp();
    345350            counter = 0;
    346351            return;
    347352        }
    348         else {
    349             this->counter++;
    350         }
    351353    }
    352354
Note: See TracChangeset for help on using the changeset viewer.