Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 16, 2019, 4:57:51 PM (5 years ago)
Author:
pomselj
Message:
 
File:
1 edited

Legend:

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

    r12391 r12392  
    111111            }
    112112        */
    113        
    114         for (OrxoBloxWall* wall : this->activeWalls_)
     113        for (OrxoBloxWall* wall : this->activeWalls_) {
    115114            if (wall != nullptr)
    116115                wall->destroy();
     116        }
    117117        this->activeWalls_.clear();
    118118       
    119119
    120         for (OrxoBloxStones* stone : this->stones_)
     120        for (OrxoBloxStones* stone : this->stones_) {
    121121            if(stone != nullptr)
    122122            stone->destroy();
     123        }
    123124        this->stones_.clear();
     125        if(this->playership != nullptr) {
     126            this->playership->destroy();
     127        }
     128        if(this->center_ != nullptr) {
     129            this->center_->destroy();
     130        }
    124131       
    125132
     
    136143        if (this->center_ != nullptr) // There needs to be a OrxoBloxCenterpoint, i.e. the area the game takes place.
    137144        {
    138             //if (this->ball_ == nullptr) // If there is no ball, create a new ball.
    139             //{
    140             //    this->ball_ = new OrxoBloxBall(this->center_->getContext());
    141                 // Apply the template for the ball specified by the centerpoint.
    142             //    this->ball_->addTemplate(this->center_->getBalltemplate());
    143             //}
    144 
    145             // Attach the ball to the centerpoint and set the parameters as specified in the centerpoint, the ball is attached to.
    146             //this->center_->attach(this->ball_);
    147             //Startposition Ball
    148             //this->ball_->setPosition(0, 0, 40);
    149             //this->ball_->setFieldDimension(this->center_->getFieldDimension());
    150             //this->ball_->setSpeed(0);
    151             //this->ball_->setAccelerationFactor(this->center_->getBallAccelerationFactor());
    152            
     145
    153146            level_=1;
    154 
    155             // Create the first Wall.
    156             this->LevelUp();
    157 
    158 
    159 
    160             //Create Ship
    161             //this->ship_ = new OrxoBloxShip(this->center_->getContext());
    162             //this->ship_->setPosition(0, 0, 0);
    163147
    164148        }
     
    230214        orxout() << "level up called" << endl;
    231215        this->playerScored(this->player_);// add points
    232        
    233 
    234216
    235217        this->createWall();
     
    264246        for(OrxoBloxStones* stone : this->stones_){
    265247            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            
     248                int x_=(stone->getPosition()).x;
     249                int y_=(stone->getPosition()).y;
     250                z_=(stone->getPosition()).z;
     251                //if(z_==90)this->end();
     252
     253                stone->setPosition(x_,y_,z_+9.0f);
     254                if( z_ >= 45){
     255                    orxout() << "calling end() function" << endl;
     256                    this->end();
     257                }
     258            }
    278259        }
    279260
Note: See TracChangeset for help on using the changeset viewer.