Changeset 12343 for code/branches/OrxoBlox_FS19/src/modules
- Timestamp:
- May 9, 2019, 11:09:18 AM (6 years ago)
- Location:
- code/branches/OrxoBlox_FS19/src/modules/OrxoBlox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc
r12342 r12343 113 113 } 114 114 115 // Destroy 6 bWalls, if present. 116 for (size_t i = 0; i < 6; ++i) 117 { 118 if (this->activeWalls_[0] != nullptr) 119 { 120 this->activeWalls_[0]->destroy(); 121 this->activeWalls_[0] = nullptr; 122 } 123 124 } 115 for (OrxoBloxStones* stone : this->stones_) 116 stone->destroy(); 117 this->stones_.clear(); 118 125 119 126 120 } … … 215 209 } 216 210 217 //void startWall(void);218 211 void OrxoBlox::LevelUp(){ 219 212 level_++; 220 for(int i=8; i>-1; --i){221 activeWalls_[i]=activeWalls_[i+1];222 }223 213 this->createWall(); 224 // activeWalls_[0]=214 //this->activeWalls_.push_back(this->futureWall_); 225 215 //When levelup? wo wird es ausgeloest? 226 216 //new location of ship … … 239 229 this->center_->attach(this->futureWall_); 240 230 241 242 this->futureWall_->setPosition(0, 0, 0.0f); 231 float y_=(this->center_->getFieldDimension()).y; 232 //stone->setPosition(size_*i -x_/2 +4.5f, -3.5f, -y_/2 + 6.5f); 233 this->futureWall_->setPosition(0, 0, -y_/2 + 6.5f); 243 234 this->futureWall_->setGame(this); 244 235 } -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.h
r12337 r12343 98 98 WeakPtr<OrxoBloxBall> ball_; //!< The OrxoBlox ball. 99 99 unsigned int level_; 100 100 101 101 WeakPtr<OrxoBloxShip> playership; 102 102 PlayerInfo* player_; … … 104 104 105 105 WeakPtr<OrxoBloxWall> futureWall_; 106 WeakPtr<OrxoBloxWall> activeWalls_[6]; //6 is the number of wallls in the game. 106 std::vector<OrxoBloxWall*> activeWalls_; 107 std::list<StrongPtr<OrxoBloxStones>> stones_; //!< A list of all stones in play. 108 107 109 }; 108 110 }
Note: See TracChangeset
for help on using the changeset viewer.