Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 16, 2019, 4:03:46 PM (5 years ago)
Author:
pomselj
Message:

OrxoBlox is linked to Projectile, level up works

File:
1 edited

Legend:

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

    r12382 r12384  
    230230        orxout() << "level up called" << endl;
    231231        this->playerScored(this->player_);// add points
    232         for(OrxoBloxStones* stone : this->stones_){
    233             int x_=(stone->getPosition()).x;
    234             int y_=(stone->getPosition()).y;
    235             z_=(stone->getPosition()).z;
    236             //if(z_==90)this->end();
    237 
    238             stone->setPosition(x_,y_,z_+9.0f);
    239            
    240         }
     232       
    241233
    242234
     
    270262        //create balls
    271263        //insert new wall
    272         if( z_ >= 45){
    273             orxout() << "calling end() function" << endl;
    274             this->end();
    275             }
     264        for(OrxoBloxStones* stone : this->stones_){
     265            if (stone != nullptr) {
     266            int x_=(stone->getPosition()).x;
     267            int y_=(stone->getPosition()).y;
     268            z_=(stone->getPosition()).z;
     269            //if(z_==90)this->end();
     270
     271            stone->setPosition(x_,y_,z_+9.0f);
     272            if( z_ >= 45){
     273                orxout() << "calling end() function" << endl;
     274                this->end();
     275            }
     276            }
     277           
     278        }
     279
    276280       
    277281    }
Note: See TracChangeset for help on using the changeset viewer.