Changeset 12392 for code/branches/OrxoBlox_FS19/src
- Timestamp:
- May 16, 2019, 4:57:51 PM (6 years ago)
- Location:
- code/branches/OrxoBlox_FS19/src/modules
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc
r12391 r12392 111 111 } 112 112 */ 113 114 for (OrxoBloxWall* wall : this->activeWalls_) 113 for (OrxoBloxWall* wall : this->activeWalls_) { 115 114 if (wall != nullptr) 116 115 wall->destroy(); 116 } 117 117 this->activeWalls_.clear(); 118 118 119 119 120 for (OrxoBloxStones* stone : this->stones_) 120 for (OrxoBloxStones* stone : this->stones_) { 121 121 if(stone != nullptr) 122 122 stone->destroy(); 123 } 123 124 this->stones_.clear(); 125 if(this->playership != nullptr) { 126 this->playership->destroy(); 127 } 128 if(this->center_ != nullptr) { 129 this->center_->destroy(); 130 } 124 131 125 132 … … 136 143 if (this->center_ != nullptr) // There needs to be a OrxoBloxCenterpoint, i.e. the area the game takes place. 137 144 { 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 153 146 level_=1; 154 155 // Create the first Wall.156 this->LevelUp();157 158 159 160 //Create Ship161 //this->ship_ = new OrxoBloxShip(this->center_->getContext());162 //this->ship_->setPosition(0, 0, 0);163 147 164 148 } … … 230 214 orxout() << "level up called" << endl; 231 215 this->playerScored(this->player_);// add points 232 233 234 216 235 217 this->createWall(); … … 264 246 for(OrxoBloxStones* stone : this->stones_){ 265 247 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 } 278 259 } 279 260 -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxWall.cc
r12360 r12392 34 34 if(j<2){ 35 35 this->size_ = 9.0f; 36 OrxoBloxStones* stone = new OrxoBloxStones(this-> getContext());36 OrxoBloxStones* stone = new OrxoBloxStones(this->center_->getContext()); 37 37 if (stone == nullptr) { 38 38 std::abort(); -
code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/BasicProjectile.cc
r12378 r12392 92 92 if (getDestroyAfterCollision()) 93 93 { 94 orxout() << "Destroy that stuff" << endl;95 94 this->bDestroy_ = true; // If something is hit, the object is destroyed and can't hit something else. 96 95 // The projectile is destroyed by its tick()-function (in the following tick). … … 174 173 { 175 174 if(GameMode::isMaster() && this->bDestroy_) { 176 orxout() << "Set true, smhow" << endl;177 175 this->destroy(); 178 176 } … … 186 184 { 187 185 if(GameMode::isMaster()) { 188 orxout() << "Deleted myself" << endl;189 186 this->destroy(); 190 187 }
Note: See TracChangeset
for help on using the changeset viewer.