Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 12349 for code


Ignore:
Timestamp:
May 9, 2019, 1:33:42 PM (5 years ago)
Author:
ahuwyler
Message:

cleanup active Walls

Location:
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox
Files:
3 edited

Legend:

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

    r12346 r12349  
    109109        if (this->futureWall_)
    110110            {
    111                 this->futureWall_->destroy();
    112                 this->futureWall_ = nullptr;
    113             }
     111            this->futureWall_->destroy();
     112            this->futureWall_ = nullptr;
     113            }
     114
     115        for (OrxoBloxWall* wall : this->activeWalls_)
     116            wall->destroy();
     117        this->activeWalls_.clear();
     118       
    114119
    115120        for (OrxoBloxStones* stone : this->stones_)
     
    147152
    148153            // Create the first Wall.
    149             this->createWall();
     154            this->LevelUp();
    150155
    151156            //Create Ship
     
    212217        level_++;
    213218        this->createWall();
     219
     220        for(OrxoBloxWall* Wall : this->activeWalls_){
     221            int x_=(Wall->getPosition()).x;
     222            orxout()<<x_<<endl;
     223            Wall->setPosition(0,0,x_+10.0f);
     224        }
     225
    214226        this->activeWalls_.push_back(this->futureWall_);
     227
     228
    215229        for (int i = 0; i < this->futureWall_->getNumberOfStones(); i++)
    216230            this->stones_.push_back(this->futureWall_->getStone(i));
     
    244258    }
    245259
    246     OrxoBloxStones* OrxoBlox::CheckForCollision(OrxoBloxBall* Ball) {
     260    /*OrxoBloxStones* OrxoBlox::CheckForCollision(OrxoBloxBall* Ball) {
    247261
    248262        orxout() << "Checking for Collision" << endl;
     
    261275        orxout() << "Found nothing...." << endl;
    262276        return nullptr;
    263     }
     277    }*/
    264278   
    265279}
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxBall.cc

    r12347 r12349  
    150150                position.z = this-> fieldHeight_ / 2;
    151151                // Set the velocity to zero
     152               
     153                orxoblox_->LevelUp();
     154
    152155
    153156                //this->setSpeed(0); // doesn't work here, why??;
     
    209212        if (position != this->getPosition())
    210213            this->setPosition(position);
    211         this->Collides((this->orxoblox_->CheckForCollision(this)));
     214        //this->Collides((this->orxoblox_->CheckForCollision(this)));
    212215
    213216 
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxBall.h

    r12347 r12349  
    151151            WorldSound* defBoundarySound_;
    152152            OrxoBlox* orxoblox_;
    153             OrxoBlox* getOrxoBlox();
     153       
    154154    };
    155155}
Note: See TracChangeset for help on using the changeset viewer.