Changeset 10752
- Timestamp:
- Nov 2, 2015, 3:23:03 PM (9 years ago)
- Location:
- code/branches/explosionChunksHS15
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/explosionChunksHS15/data/levels/emptyLevel.oxw
r10669 r10752 38 38 <templates> 39 39 <Template link=spaceshipassff /> 40 </templates> 40 </templates> 41 42 41 43 </SpaceShip> 42 44 <SpaceShip … … 47 49 <Template link=spaceshipassff /> 48 50 </templates> 51 <explosion> 52 53 <ExplosionPart mesh="ship.mesh" effect="Orxonox/smoke7" /> 54 <ExplosionPart mesh="ship.mesh" effect="Orxonox/smoke7" /> 55 56 </explosion> 57 49 58 </SpaceShip> 50 59 <SpaceShip … … 55 64 <Template link=spaceshipassff /> 56 65 </templates> 66 <explosion> 67 68 <ExplosionPart mesh="ship.mesh" effect="Orxonox/smoke7" /> 69 <ExplosionPart mesh="ship.mesh" effect="Orxonox/smoke7" /> 70 71 </explosion> 72 57 73 </SpaceShip> 58 74 -
code/branches/explosionChunksHS15/data/levels/templates/spaceshipEscort.oxt
r10669 r10752 5 5 spawnparticlesource = "Orxonox/fairytwirl" 6 6 spawnparticleduration = 3 7 explosionchunks = 407 explosionchunks = 10 8 8 9 9 health = 80 -
code/branches/explosionChunksHS15/src/orxonox/worldentities/CMakeLists.txt
r10669 r10752 12 12 SpawnPoint.cc 13 13 TeamSpawnPoint.cc 14 VaydinExplosion.cc14 ExplosionPart.cc 15 15 ) 16 16 -
code/branches/explosionChunksHS15/src/orxonox/worldentities/pawns/Pawn.cc
r10669 r10752 42 42 #include "worldentities/ExplosionChunk.h" 43 43 #include "worldentities/BigExplosion.h" 44 //#include "worldentities/VaydinExplosion.h"44 #include "worldentities/ExplosionPart.h" 45 45 #include "weaponsystem/WeaponSystem.h" 46 46 #include "weaponsystem/WeaponSlot.h" … … 86 86 this->aimPosition_ = Vector3::ZERO; 87 87 88 //this->explosionPartList_ = NULL; 89 88 90 if (GameMode::isMaster()) 89 91 { … … 144 146 XMLPortObject(Pawn, WeaponPack, "weapons", addWeaponPackXML, getWeaponPack, xmlelement, mode); 145 147 146 //XMLPortObject(Pawn, VaydinExplosion, "vaydinexplosion", addVaydinExplosion, getVaydinExplosion, xmlelement, mode);148 XMLPortObject(Pawn, ExplosionPart, "explosion", addExplosionPart, getExplosionPart, xmlelement, mode); 147 149 148 150 XMLPortParam(Pawn, "reloadrate", setReloadRate, getReloadRate, xmlelement, mode).defaultValues(0); … … 385 387 this->setDestroyWhenPlayerLeft(false); 386 388 387 BigExplosion* chunk = new BigExplosion(this->getContext());389 /*ExplosionPart* chunk = new ExplosionPart(this->getContext()); 388 390 chunk->setPosition(this->getPosition()); 389 391 chunk->setVelocity(this->getVelocity()); 392 chunk->Explode();*/ 393 394 while(!explosionPartList_.empty()) 395 { 396 explosionPartList_.back()->setPosition(this->getPosition()); 397 explosionPartList_.back()->setVelocity(this->getVelocity()); 398 explosionPartList_.back()->Explode(); 399 explosionPartList_.pop_back(); 400 } 390 401 391 402 this->explosionSound_->setPosition(this->getPosition()); … … 497 508 this->spawneffect(); 498 509 } 510 511 512 void Pawn::addExplosionPart(ExplosionPart* ePart) 513 {this->explosionPartList_.push_back(ePart);} 514 515 516 ExplosionPart * Pawn::getExplosionPart() 517 {return this->explosionPartList_.back();} 518 519 499 520 500 521 /* WeaponSystem: -
code/branches/explosionChunksHS15/src/orxonox/worldentities/pawns/Pawn.h
r10437 r10752 33 33 34 34 #include <string> 35 #include <vector> 35 36 #include "interfaces/PickupCarrier.h" 36 37 #include "interfaces/RadarViewable.h" 37 38 #include "worldentities/ControllableEntity.h" 39 #include "worldentities/ExplosionPart.h" 38 40 39 41 … … 147 149 virtual void postSpawn(); 148 150 151 void addExplosionPart(ExplosionPart* ePart); 152 ExplosionPart * getExplosionPart(); 153 149 154 void addWeaponSlot(WeaponSlot * wSlot); 150 155 WeaponSlot * getWeaponSlot(unsigned int index) const; … … 241 246 unsigned int numexplosionchunks_; 242 247 248 std::vector<ExplosionPart*> explosionPartList_; 249 243 250 private: 244 251 void registerVariables(); -
code/branches/explosionChunksHS15/src/orxonox/worldentities/pawns/SpaceShip.cc
r10216 r10752 115 115 116 116 XMLPortObject(SpaceShip, Engine, "engines", addEngine, getEngine, xmlelement, mode); 117 118 117 119 } 118 120
Note: See TracChangeset
for help on using the changeset viewer.