Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 16, 2019, 6:27:53 PM (5 years ago)
Author:
pomselj
Message:

almost done

File:
1 edited

Legend:

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

    r12392 r12394  
    7171        this->player_ = nullptr;
    7272        level_ = 0;
     73        this->counter = 0;
    7374
    7475        this->setHUDTemplate("OrxoBloxHUD");
     
    144145        {
    145146
    146             level_=1;
     147            level_= 1;
    147148
    148149        }
     
    213214
    214215        orxout() << "level up called" << endl;
    215         this->playerScored(this->player_);// add points
     216        //this->playerScored(this->player_);// add points
    216217
    217218        this->createWall();
    218219        this->activeWalls_.push_back(this->futureWall_);
    219         for (int i = 0; i < this->futureWall_->getNumberOfStones(); i++) {
    220             if (this->futureWall_->getStone(i) == nullptr) {
    221                 orxout() << "Added nullptr to std::list stones_" << endl;
    222             }
    223 
     220/*        for (int i = 0; i < this->futureWall_->getNumberOfStones(); i++) {
    224221            this->stones_.push_back(this->futureWall_->getStone(i));
    225         }
     222        }*/
    226223
    227224        for(OrxoBloxWall* wall : this->activeWalls_) {
     225            if(wall == nullptr) {
     226                continue;
     227            }
    228228            if(wall->isEmpty()) {
    229229                wall->destroy();
     
    340340    }
    341341  */ 
     342    void OrxoBlox::count() {
     343        if(this->counter >= this->max_counter) {
     344            this->LevelUp();
     345            counter = 0;
     346            return;
     347        }
     348        else {
     349            this->counter++;
     350        }
     351    }
     352
     353
    342354}
Note: See TracChangeset for help on using the changeset viewer.