Changeset 12394 for code/branches/OrxoBlox_FS19/src/modules
- Timestamp:
- May 16, 2019, 6:27:53 PM (6 years ago)
- Location:
- code/branches/OrxoBlox_FS19/src/modules
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc
r12392 r12394 71 71 this->player_ = nullptr; 72 72 level_ = 0; 73 this->counter = 0; 73 74 74 75 this->setHUDTemplate("OrxoBloxHUD"); … … 144 145 { 145 146 146 level_= 1;147 level_= 1; 147 148 148 149 } … … 213 214 214 215 orxout() << "level up called" << endl; 215 this->playerScored(this->player_);// add points216 //this->playerScored(this->player_);// add points 216 217 217 218 this->createWall(); 218 219 this->activeWalls_.push_back(this->futureWall_); 219 for (int i = 0; i < this->futureWall_->getNumberOfStones(); i++) { 220 if (this->futureWall_->getStone(i) == nullptr) { 221 orxout() << "Added nullptr to std::list stones_" << endl; 222 } 223 220 /* for (int i = 0; i < this->futureWall_->getNumberOfStones(); i++) { 224 221 this->stones_.push_back(this->futureWall_->getStone(i)); 225 } 222 }*/ 226 223 227 224 for(OrxoBloxWall* wall : this->activeWalls_) { 225 if(wall == nullptr) { 226 continue; 227 } 228 228 if(wall->isEmpty()) { 229 229 wall->destroy(); … … 340 340 } 341 341 */ 342 void OrxoBlox::count() { 343 if(this->counter >= this->max_counter) { 344 this->LevelUp(); 345 counter = 0; 346 return; 347 } 348 else { 349 this->counter++; 350 } 351 } 352 353 342 354 } -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.h
r12391 r12394 91 91 //OrxoBloxStones* CheckForCollision(OrxoBloxBall* Ball); 92 92 virtual void addBots(unsigned int amount) override{} //<! overwrite function in order to bypass the addbots command 93 void count(); 93 94 protected: 94 95 private: … … 108 109 WeakPtr<OrxoBloxWall> futureWall_; 109 110 std::vector<OrxoBloxWall*> activeWalls_; 110 std::list<StrongPtr<OrxoBloxStones>> stones_; //!< A list of all stones in play. 111 std::vector<OrxoBloxStones*> stones_; //!< A list of all stones in play. 112 int counter; 113 const int max_counter = 10; 111 114 112 115 }; -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxStones.cc
r12393 r12394 18 18 19 19 this->size_ = 9.0f; 20 this->health_ = 1 + static_cast<unsigned int>(rnd(6.0f)); //<! random number between 0 and 7;20 this->health_ = 1; 21 21 this->delay_ = false; 22 22 } … … 33 33 return this->size_; 34 34 } 35 36 bool OrxoBloxStones::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) 37 { 38 orxout() << "a stone should die" << endl; 39 this->destroy(); 40 return true; 41 } 35 42 } -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxStones.h
r12393 r12394 70 70 71 71 float getSize(); 72 virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override; 72 73 73 74 private: -
code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/BallProjectile.cc
r12393 r12394 60 60 this->orxoblox_ = this->getOrxoBlox(); 61 61 this->setCollisionShapeRadius(2.5); 62 this->setDamage(1000); 62 63 63 64 //setEffect("Orxonox/sparks2"); … … 186 187 position.z = this-> fieldHeight_; 187 188 188 orxoblox_->LevelUp(); 189 //orxoblox_->LevelUp(); 190 orxoblox_->count(); 189 191 suicidal = true; 190 192 -
code/branches/OrxoBlox_FS19/src/modules/weapons/weaponmodes/BallGun.cc
r12378 r12394 59 59 60 60 this->reloadTime_ = 0.25f; 61 this->damage_ = 0.0f; //default 1561 this->damage_ = 10000; //default 15 62 62 this->speed_ = 100; 63 63 this->delay_ = 100;
Note: See TracChangeset
for help on using the changeset viewer.