Changeset 11628 for code/branches
- Timestamp:
- Dec 4, 2017, 3:29:13 PM (7 years ago)
- Location:
- code/branches/SOBv2_HS17/src/modules/superorxobros
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/SOBv2_HS17/src/modules/superorxobros/SOB.h
r11601 r11628 76 76 points_+=100; 77 77 } 78 void addGumbaBoss() { 79 points_+=5000; 80 } 78 81 void addPoints(int poi) { 79 82 points_+=poi; -
code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFigure.cc
r11601 r11628 45 45 #include "SOBMushroom.h" 46 46 #include "SOBGumba.h" 47 #include "SOBGumbaBoss.h" 47 48 #include "SOBFireball.h" 48 49 #include "SOB.h" … … 114 115 SOBMushroom* mush = orxonox_cast<SOBMushroom*> (otherObject); 115 116 SOBGumba* gumba = orxonox_cast<SOBGumba*> (otherObject); 117 SOBGumbaBoss* gumbaBoss = orxonox_cast<SOBGumbaBoss*> (otherObject); 116 118 SOBFlagstone* flagstone = orxonox_cast<SOBFlagstone*> (otherObject); 117 119 SOBCastlestone* castlestone = orxonox_cast<SOBCastlestone*> (otherObject); 118 SOBFireball* fireball= orxonox_cast<SOBFireball*> (otherObject);120 SOBFireball* fireball = orxonox_cast<SOBFireball*> (otherObject); 119 121 SOB* SOBGame = orxonox_cast<SOB*> (getGametype()); 120 122 … … 133 135 134 136 } 137 135 138 136 139 137 140 //Check if otherObject is a Gumba (that walking enemies) 138 141 139 else if (gumba != nullptr && !(gumba->hasCollided_)) {142 else if (gumba != nullptr && gumbaBoss == nullptr && !(gumba->hasCollided_)) { 140 143 141 144 //If player jumps on its head, kill the Gumba, else, kill the player … … 159 162 160 163 161 } 162 } 163 164 } 165 } 166 else if (gumbaBoss != nullptr && !(gumbaBoss->hasCollided_)) { 167 if (getVelocity().z >= -20) { 168 // If player hasn't a power up, he dies. Else he dies directly. 169 this->die(); 170 } 171 172 else { 173 gumbaBoss->destroyLater(); 174 gumbaBoss->hasCollided_ = true; 175 SOBGame->addGumbaBoss(); 176 } 177 } 164 178 else if (fireball != nullptr && !(fireball->hasCollided_)){ 165 179 if(PowerUpCounter_ == 0){ … … 168 182 PowerUpCounter_--; 169 183 this->changeClothes(); 184 fireball->destroyLater(); 170 185 } 171 186 -
code/branches/SOBv2_HS17/src/modules/superorxobros/SOBGumbaBoss.cc
r11626 r11628 54 54 RegisterObject(SOBGumbaBoss); 55 55 56 gumbaMaxTime_ = 10;56 gumbaMaxTime_ = 5; 57 57 gumbaTime_ = 0; 58 58 … … 91 91 92 92 gumbaTime_ += dt; 93 orxout() << "gumbaTime_ = " << gumbaTime_ << endl;94 93 95 94 if(gumbaTime_ > gumbaMaxTime_){ 96 95 spawnFireball(); 97 orxout() << "shoot" << endl;98 96 gumbaTime_ = 0; 99 97 }
Note: See TracChangeset
for help on using the changeset viewer.