Changeset 12031 for code/branches/mergeFS18
- Timestamp:
- Oct 10, 2018, 4:08:48 PM (6 years ago)
- Location:
- code/branches/mergeFS18
- Files:
-
- 9 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
code/branches/mergeFS18
- Property svn:mergeinfo changed
/code/branches/SuperOrxoBros_FS18 (added) merged: 11820,11987-11988
- Property svn:mergeinfo changed
-
code/branches/mergeFS18/data/levels/SOB.oxw
r11783 r12031 39 39 <SOBFigure> 40 40 <camerapositions> 41 <CameraPosition position="0,- 150,30" absolute=true mouselook=false drag=false direction="0,1,0"/>41 <CameraPosition position="0,-250,30" absolute=true mouselook=false drag=false direction="0,1,0"/> 42 42 </camerapositions> 43 43 </SOBFigure> … … 122 122 123 123 124 125 126 124 <!-- SOBGumbas undergroundlevel--> 125 <SOBGumba collisionType="dynamic" speed=20 position = "350,0,-70"> 126 <attached> 127 <Model mesh="Goomba.mesh" position="0,0,1" scale=3 pitch=90/> 128 129 </attached> 130 <collisionShapes> 131 <BoxCollisionShape position="0,0,0" halfExtents="5,5,3" /> 132 </collisionShapes> 133 </SOBGumba> 134 135 136 137 <!-- SOBGumbas groundlevel--> 127 138 <SOBGumba collisionType="dynamic" speed=40 position = "240,0,0"> 128 139 <attached> … … 259 270 <StaticEntity collisionType="static" mass='-1'> 260 271 <collisionShapes> 261 <BoxCollisionShape position="340,0,-20" halfExtents="345,5,5" /> 262 </collisionShapes> 263 </StaticEntity> 264 265 272 <BoxCollisionShape position="140,0,-20" halfExtents="135,5,5" /> 273 <BoxCollisionShape position="330,0,-20" halfExtents="30,5,5" /> 274 <BoxCollisionShape position="400,0,-20" halfExtents="60,5,5" /> 275 <BoxCollisionShape position="530,0,-20" halfExtents="50,5,5" /> 276 <BoxCollisionShape position="640,0,-20" halfExtents="40,5,5" /> 277 </collisionShapes> 278 </StaticEntity> 279 <!-- Boden 1 Unterirdisch--> 280 <Model mesh="Cube2.12.mesh" position="270,0,-90" scale=10 Pitch=90/> <!-- B1.1 --> 281 <Model mesh="Cube2.12.mesh" position="390,0,-90" scale=10 Pitch=90/> <!-- B1.2--> 282 283 <!-- CollisionShape fuer Unterirdisch--> 284 <StaticEntity collisionType="static" mass='-1'> 285 <collisionShapes> 286 <BoxCollisionShape position="390,0,-80" halfExtents="125,5,5" /> 287 288 </collisionShapes> 289 </StaticEntity> 290 <StaticEntity collisionType="static" mass='1000000000'> 291 <collisionShapes> 292 293 <BoxCollisionShape position="265,0,-80" halfExtents="5,5,5" /> 294 <BoxCollisionShape position="510,0,-80" halfExtents="5,5,5" /> 295 </collisionShapes> 296 </StaticEntity> 266 297 267 298 … … 316 347 </SOBQBlock> 317 348 318 <Model mesh="Cube1.1.mesh" position="250,0,20" scale=10/> <!-- L1.7 --> 349 350 <SOBTube collisionType="dynamic" cool=1 position="295,5,-23" mass='10000'> 351 <attached> 352 353 <Model mesh="Rohr.mesh" position="0,0,-12" scale=10 roll=90 yaw=90 pitch=-90/> 354 </attached> 355 </SOBTube> 356 357 <SOBTube collisionType="dynamic" cool=1 position="475,5,-3" mass='10000'> 358 <attached> 359 <!-- L1.6 --> 360 <Model mesh="Rohr.mesh" position="0,0,-12" scale=10 roll=90 yaw=90 pitch=-90/> 361 </attached> 362 </SOBTube> 363 364 <Model mesh="Cube1.1.mesh" position="250,0,20" scale=10/> <!-- L1.7 --> 319 365 <!-- Rohre--> 320 <Model mesh="Rohr.mesh" position="295,5,-35" scale=10 roll=90 yaw=90 pitch=-90/> <!-- L1.8 --> 321 <Model mesh="Rohr.mesh" position="395,5,-25" scale=10 roll=90 yaw=90 pitch=-90/> <!-- L1.9 --> 322 <Model mesh="Rohr.mesh" position="475,5,-15" scale=10 roll=90 yaw=90 pitch=-90 /> <!-- L1.10 --> 323 <Model mesh="Rohr.mesh" position="585,5,-15" scale=10 roll=90 yaw=90 pitch=-90 /> <!-- L1.11 --> 366 <!-- L1.8 --> 367 <!-- L1.11 --> 324 368 325 369 <SOBQBlock collisionType="static" type="Mushroom" position="650,0,30" mass='-1'> … … 343 387 <BoxCollisionShape position="210,0,20" halfExtents="5,5,5" /> <!-- 1.3 --> 344 388 <BoxCollisionShape position="230,0,20" halfExtents="5,5,5" /> <!-- 1.5 --> 345 <BoxCollisionShape position="250,0,20" halfExtents="5,5,5" /> <!-- 1.7 --> 346 347 348 </collisionShapes> 349 </StaticEntity> 350 389 390 <BoxCollisionShape position="250,0,20" halfExtents="5,5,5" /> <!-- 1.7 --> 391 392 393 </collisionShapes> 394 </StaticEntity> 395 <Model mesh="Rohr.mesh" position="395,0,-25" scale=10 roll=90 yaw=90 pitch=-90/> 396 <Model mesh="Rohr.mesh" position="585,0,-15" scale=10 roll=90 yaw=90 pitch=-90/> 351 397 352 398 <StaticEntity collisionType="static" > 353 <collisionShapes> 354 355 356 <BoxCollisionShape position="295,0,-4" halfExtents="12,5,12" /> <!-- 1.8 --> 357 <BoxCollisionShape position="395,0,1" halfExtents="12,5,17" /> <!-- 1.9 --> 358 <BoxCollisionShape position="475,0,6" halfExtents="12,5,22" /> <!-- 1.10 --> 359 <BoxCollisionShape position="585,0,6" halfExtents="12,5,22" /> <!-- 1.11 --> 360 361 </collisionShapes> 362 </StaticEntity> 399 400 401 402 <collisionShapes> 403 404 405 406 <BoxCollisionShape position="395,0,1" halfExtents="12,5,17" /> 407 408 <BoxCollisionShape position="585,0,6" halfExtents="12,5,22" /> 409 410 </collisionShapes> 411 </StaticEntity> 363 412 364 413 -
code/branches/mergeFS18/src/modules/superorxobros/CMakeLists.txt
r11783 r12031 3 3 SOBCenterpoint.cc 4 4 SOB.cc 5 SOBTube.cc 5 6 SOBFigure.cc 6 7 SOBItem.cc … … 14 15 SOBCoin.cc 15 16 SOBGumbaBoss.cc 17 16 18 17 19 ) -
code/branches/mergeFS18/src/modules/superorxobros/SOB.cc
r11783 r12031 149 149 //If player has reached end of level 150 150 if (this->figure_ != nullptr && figure_->lvlEnded_) { 151 std::stringstream a; 151 std::stringstream a;setLvl(2); 152 152 if(!newHighscore){ 153 153 a << "Nice! " << getPoints() << " Points in " << (400-getTimeLeft())/2 <<"s.\n\nPress <Space> to restart"; -
code/branches/mergeFS18/src/modules/superorxobros/SOBFigure.cc
r11783 r12031 43 43 #include <OgreMath.h> 44 44 45 #include "SOBTube.h" 45 46 #include "SOBMushroom.h" 46 47 #include "SOBGumba.h" … … 50 51 #include "SOBFlagstone.h" 51 52 #include "SOBCastlestone.h" 52 #include "SOBFireball.h"53 53 #include "Highscore.h" 54 54 #include <BulletCollision/NarrowPhaseCollision/btManifoldPoint.h> … … 72 72 firePressed_ = false; 73 73 collDisZ_ = 0; 74 74 tube = NULL; 75 76 //Variables for Action in Tube 77 tcol_ = false; 78 tubing = false; 79 kkk = 0; 80 75 81 //Times and turning 76 82 timeSinceLastFire_ = 0.0; … … 89 95 reachedLvlEndState_ = 0; 90 96 97 positiontube_=10000; 91 98 // Properties concerning PowerUps and items 99 92 100 PowerUpCounter_ = 0; 93 101 maxPowerUp_ = 2; … … 112 120 113 121 //Orxocast returns object with casted type if otherObject has that class, and if not a nullptr 122 //SOBTube* test; 123 114 124 SOBMushroom* mush = orxonox_cast<SOBMushroom*> (otherObject); 125 tube = orxonox_cast<SOBTube*> (otherObject); 115 126 SOBGumba* gumba = orxonox_cast<SOBGumba*> (otherObject); 116 127 SOBGumbaBoss* gumbaBoss = orxonox_cast<SOBGumbaBoss*> (otherObject); … … 121 132 122 133 134 123 135 //Check if otherObject is a powerup-mushroom 124 136 if (mush != nullptr && !(mush->hasCollided_)) { … … 133 145 134 146 135 } 136 137 138 139 //Check if otherObject is a Gumba (that walking enemies) 140 141 else if (gumba != nullptr && gumbaBoss == nullptr && !(gumba->hasCollided_)) {147 }else if(tube != nullptr && !(tube->hasCollided_)){ //Check if other Object is a tube and set position wher tube is in positiontube_ 148 tube->hasCollided_=true;positiontube_=getPosition().x;tcol_=true; //tcol_ used for movedown function in SOBfigure.cc 149 150 151 152 }else if (gumba != nullptr && gumbaBoss == nullptr && !(gumba->hasCollided_)) { 153 //Check if otherObject is a Gumba (that walking enemies) 142 154 143 155 //If player jumps on its head, kill the Gumba, else, kill the player … … 209 221 return 1; 210 222 } 211 223 /*bool SOBFigure::tubeAction(){ 224 return true; 225 }*/ 212 226 //Function to spawn the Fireball 213 227 void SOBFigure::spawnFireball() { … … 240 254 { 241 255 SUPER(SOBFigure, tick, dt); 242 256 243 257 244 258 bool inputAllowed = true; 245 //SOB* SOBGame = orxonox_cast<SOB*>(getGametype());259 246 260 247 261 //the particle spawner that generates the fire from the backpack when pressed … … 291 305 velocity.y = 0; 292 306 //If player falls in a hole 293 if (position.z < -1 00) {307 if (position.z < -180) { 294 308 dead_ = true; 295 309 SOBGame->setDone(true); … … 355 369 356 370 //If moveUp pressed, fire a fireball 357 if(moveUpPressed_ && (PowerUpCounter_ >= FireballPower) && fireallowed_)371 if(moveUpPressed_ && inputAllowed) //if pressed up jump through tube if you are underground 358 372 { 373 Vector3 position1 = getPosition(); 374 375 376 377 378 if(position1.z>=-100 && position1.z<=-40){ 379 position1.z=40; 380 if(460<=position1.x && position1.x<480){setPosition(position1);} //little hack works without this but first tube must be touched //position where second tube is 381 if(positiontube_-10<=position1.x && position1.x<positiontube_+10){ //function for jumping through any SOBtube`s 382 setPosition(position1);}} 383 384 385 if((PowerUpCounter_ >= FireballPower) && fireallowed_){ 359 386 spawnFireball(); 387 360 388 fireallowed_ = false; 361 firecooldown_ = 0; 389 firecooldown_ = 0;} 390 } 391 392 if(moveDownPressed_ && inputAllowed ){ //if movedownpressed change collisiontype of tube and slip through tube 393 394 395 Vector3 position1 = getPosition(); 396 397 398 399 400 if(tube != nullptr && !(tube->movedown)){ //Check if other Object is a tube 401 402 if(positiontube_-10<position1.x && position1.x<positiontube_+10){ 403 tube->movedown=true;} 404 } 405 362 406 } 363 407 … … 419 463 moveLeftPressed_ = false; 420 464 moveRightPressed_ = false; 465 421 466 422 467 isColliding_ = false; -
code/branches/mergeFS18/src/modules/superorxobros/SOBFigure.h
r11783 r12031 32 32 #include "superorxobros/SOBPrereqs.h" 33 33 #include "worldentities/ControllableEntity.h" 34 #include "SOBTube.h" 34 35 35 36 … … 58 59 //Soooo many declarations 59 60 bool fireallowed_; 60 61 bool moveUpPressed_; 61 SOBTube* tube; //class SOBTube* used because tube needs to be global using in collides against function and tick function in SOBfigure.cc 62 bool moveUpPressed_; 63 int kkk; 64 65 bool tcol_; //used for getting through tube 66 bool tubing; //used for getting through tube 62 67 bool moveDownPressed_; 63 68 bool moveLeftPressed_; … … 68 73 float lastSpeed_z; 69 74 float firecooldown_; 75 float positiontube_; 70 76 bool isColliding_; 71 77 WorldEntity* particlespawner_; -
code/branches/mergeFS18/src/modules/superorxobros/SOBGumba.cc
r11783 r12031 106 106 { 107 107 SUPER(SOBGumba, tick, dt); 108 108 109 109 if (!changeAllowed_) { 110 110 changedOn_+= dt; -
code/branches/mergeFS18/src/modules/superorxobros/SOBItem.h
r11783 r12031 49 49 virtual void setFigure(SOBFigure* newFigure); 50 50 virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override; 51 52 51 53 52 bool attachedToFigure_; -
code/branches/mergeFS18/src/modules/superorxobros/SOBPrereqs.h
r11783 r12031 80 80 class SOBCastlestone; 81 81 class SOBCoin; 82 class SOBTube; 82 83 83 84 }
Note: See TracChangeset
for help on using the changeset viewer.