Changeset 10962 for code/branches/presentationHS15/src
- Timestamp:
- Dec 9, 2015, 4:03:59 PM (9 years ago)
- Location:
- code/branches/presentationHS15
- Files:
-
- 2 deleted
- 12 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentationHS15
- Property svn:mergeinfo changed
/code/branches/explosionChunksHS15 (added) merged: 10641,10669,10752-10753,10755,10786,10807,10810,10837,10937,10939,10942
- Property svn:mergeinfo changed
-
code/branches/presentationHS15/src/libraries/tools/ParticleInterface.cc
r10624 r10962 233 233 this->particleSystem_->setKeepParticlesInLocalSpace(keep); 234 234 } 235 236 void ParticleInterface::setDimensions(float scale) 237 { 238 this->particleSystem_->setDefaultDimensions(scale * this->particleSystem_->getDefaultWidth(), scale * this->particleSystem_->getDefaultHeight()); 239 } 235 240 } -
code/branches/presentationHS15/src/libraries/tools/ParticleInterface.h
r10624 r10962 75 75 void setDetailLevel(unsigned int level); 76 76 77 void setDimensions(float scale); 78 77 79 protected: 78 80 virtual void changedTimeFactor(float factor_new, float factor_old); -
code/branches/presentationHS15/src/modules/dodgerace/DodgeRace.cc
r10624 r10962 71 71 for (int i = 0; i < 7; i++) 72 72 { 73 BigExplosion* chunk = new BigExplosion(this->center_->getContext()); 74 chunk->setPosition(Vector3(600, 0, 100.f * i - 300)); 75 chunk->setVelocity(Vector3(1000, 0, 0)); //player->getVelocity() 76 chunk->setScale(20); 73 WeakPtr<ExplosionPart> chunk5 = new ExplosionPart(this->center_->getContext()); 74 chunk5->setPosition(Vector3(600, 0, 100.f * i - 300)); 75 chunk5->setVelocity(Vector3(1000, 0, 0)); //player->getVelocity() 76 chunk5->setScale(10); 77 chunk5->setEffect1("Orxonox/explosion2b"); 78 chunk5->setEffect2("Orxonox/smoke6"); 79 chunk5->Explode(); 80 77 81 } 78 82 } -
code/branches/presentationHS15/src/modules/dodgerace/DodgeRace.h
r10624 r10962 56 56 57 57 #include "core/command/ConsoleCommand.h" 58 #include "worldentities/BigExplosion.h"59 58 60 59 #include "gametypes/Deathmatch.h" -
code/branches/presentationHS15/src/modules/invader/Invader.cc
r10624 r10962 51 51 52 52 #include "core/command/ConsoleCommand.h" 53 #include "worldentities/ BigExplosion.h"53 #include "worldentities/ExplosionPart.h" 54 54 55 55 namespace orxonox … … 82 82 for (int i = 0; i < 7; i++) 83 83 { 84 BigExplosion* chunk = new BigExplosion(this->center_->getContext()); 85 chunk->setPosition(Vector3(600, 0, 100.f * i - 300)); 86 chunk->setVelocity(Vector3(1000, 0, 0)); //player->getVelocity() 87 chunk->setScale(20); 84 85 WeakPtr<ExplosionPart> chunk5 = new ExplosionPart(this->center_->getContext()); 86 chunk5->setPosition(this->center_->getPosition()); 87 chunk5->setVelocity(Vector3(1000, 0, 0)); //player->getVelocity() 88 chunk5->setScale(10); 89 chunk5->setEffect1("Orxonox/explosion2b"); 90 chunk5->setEffect2("Orxonox/smoke6"); 91 chunk5->setMinSpeed(0); 92 chunk5->setMaxSpeed(0); 93 chunk5->Explode(); 94 88 95 } 89 96 } -
code/branches/presentationHS15/src/orxonox/OrxonoxPrereqs.h
r10961 r10962 176 176 177 177 // worldentities 178 class BigExplosion;179 178 class CameraPosition; 180 179 class ControllableEntity; -
code/branches/presentationHS15/src/orxonox/items/ShipPart.cc
r10624 r10962 41 41 #include "worldentities/StaticEntity.h" 42 42 #include "items/PartDestructionEvent.h" 43 #include "worldentities/BigExplosion.h"44 43 #include "chat/ChatManager.h" 45 44 … … 105 104 void ShipPart::explode() 106 105 { 107 BigExplosion* chunk = new BigExplosion(this->getContext());108 chunk->setPosition(this->parent_->getPosition() + this->parent_->getOrientation() * (this->explosionPosition_));109 // chunk->setPosition(this->parent_->getPosition() + this->parent_->getOrientation() * Vector3(this->entityList_[0]->getLocalInertia()));110 chunk->setVelocity(this->parent_->getVelocity());106 // BigExplosion* chunk = new BigExplosion(this->getContext()); 107 // chunk->setPosition(this->parent_->getPosition() + this->parent_->getOrientation() * (this->explosionPosition_)); 108 // //chunk->setPosition(this->parent_->getPosition() + this->parent_->getOrientation() * Vector3(this->entityList_[0]->getLocalInertia())); 109 // chunk->setVelocity(this->parent_->getVelocity()); 111 110 112 111 // this->explosionSound_->setPosition(this->parent_->getPosition()); -
code/branches/presentationHS15/src/orxonox/worldentities/CMakeLists.txt
r8706 r10962 6 6 ControllableEntity.cc 7 7 Drone.cc 8 BigExplosion.cc9 8 EffectContainer.cc 10 9 ExplosionChunk.cc … … 12 11 SpawnPoint.cc 13 12 TeamSpawnPoint.cc 13 ExplosionPart.cc 14 14 ) 15 15 -
code/branches/presentationHS15/src/orxonox/worldentities/pawns/Pawn.cc
r10961 r10962 41 41 #include "graphics/ParticleSpawner.h" 42 42 #include "worldentities/ExplosionChunk.h" 43 #include "worldentities/ BigExplosion.h"43 #include "worldentities/ExplosionPart.h" 44 44 #include "weaponsystem/WeaponSystem.h" 45 45 #include "weaponsystem/WeaponSlot.h" … … 84 84 this->aimPosition_ = Vector3::ZERO; 85 85 86 //this->explosionPartList_ = NULL; 87 86 88 if (GameMode::isMaster()) 87 89 { … … 136 138 XMLPortParam(Pawn, "spawnparticlesource", setSpawnParticleSource, getSpawnParticleSource, xmlelement, mode); 137 139 XMLPortParam(Pawn, "spawnparticleduration", setSpawnParticleDuration, getSpawnParticleDuration, xmlelement, mode).defaultValues(3.0f); 138 XMLPortParam(Pawn, "explosionchunks", setExplosionChunks, getExplosionChunks, xmlelement, mode).defaultValues( 7);140 XMLPortParam(Pawn, "explosionchunks", setExplosionChunks, getExplosionChunks, xmlelement, mode).defaultValues(0); 139 141 140 142 XMLPortObject(Pawn, WeaponSlot, "weaponslots", addWeaponSlot, getWeaponSlot, xmlelement, mode); … … 145 147 XMLPortParam(Pawn, "shieldrechargerate", setShieldRechargeRate, getShieldRechargeRate, xmlelement, mode).defaultValues(0); 146 148 XMLPortParam(Pawn, "shieldrechargewaittime", setShieldRechargeWaitTime, getShieldRechargeWaitTime, xmlelement, mode).defaultValues(1.0f); 149 XMLPortObject(Pawn, ExplosionPart, "explosion", addExplosionPart, getExplosionPart, xmlelement, mode); 147 150 148 151 XMLPortParam(Pawn, "explosionSound", setExplosionSound, getExplosionSound, xmlelement, mode); … … 164 167 void Pawn::tick(float dt) 165 168 { 169 //BigExplosion* chunk = new BigExplosion(this->getContext()); 166 170 SUPER(Pawn, tick, dt); 167 171 … … 368 372 if (GameMode::isMaster()) 369 373 { 370 this->deatheffect();371 374 this->goWithStyle(); 372 375 } … … 375 378 void Pawn::goWithStyle() 376 379 { 380 377 381 this->bAlive_ = false; 378 382 this->setDestroyWhenPlayerLeft(false); 379 383 380 BigExplosion* chunk = new BigExplosion(this->getContext()); 381 chunk->setPosition(this->getPosition()); 382 chunk->setVelocity(this->getVelocity()); 384 while(!explosionPartList_.empty()) 385 { 386 explosionPartList_.back()->setPosition(this->getPosition()); 387 explosionPartList_.back()->setVelocity(this->getVelocity()); 388 explosionPartList_.back()->setOrientation(this->getOrientation()); 389 explosionPartList_.back()->Explode(); 390 explosionPartList_.pop_back(); 391 } 392 393 for (unsigned int i = 0; i < this->numexplosionchunks_; ++i) 394 { 395 ExplosionChunk* chunk = new ExplosionChunk(this->getContext()); 396 chunk->setPosition(this->getPosition()); 397 } 383 398 384 399 this->explosionSound_->setPosition(this->getPosition()); 385 400 this->explosionSound_->play(); 386 }387 void Pawn::deatheffect()388 {389 // play death effect390 /*{391 ParticleSpawner* effect = new ParticleSpawner(this->getContext());392 effect->setPosition(this->getPosition());393 effect->setOrientation(this->getOrientation());394 effect->setDestroyAfterLife(true);395 effect->setSource("Orxonox/explosion2b");396 effect->setLifetime(4.0f);397 }398 {399 ParticleSpawner* effect = new ParticleSpawner(this->getContext());400 effect->setPosition(this->getPosition());401 effect->setOrientation(this->getOrientation());402 effect->setDestroyAfterLife(true);403 effect->setSource("Orxonox/smoke6");404 effect->setLifetime(4.0f);405 }406 {407 ParticleSpawner* effect = new ParticleSpawner(this->getContext());408 effect->setPosition(this->getPosition());409 effect->setOrientation(this->getOrientation());410 effect->setDestroyAfterLife(true);411 effect->setSource("Orxonox/sparks");412 effect->setLifetime(4.0f);413 }*/414 415 416 {417 ParticleSpawner* effect = new ParticleSpawner(this->getContext());418 effect->setPosition(this->getPosition());419 effect->setOrientation(this->getOrientation());420 effect->setDestroyAfterLife(true);421 effect->setSource("orxonox/explosion_flash2");422 effect->setLifetime(5.0f);423 }424 {425 ParticleSpawner* effect = new ParticleSpawner(this->getContext());426 effect->setPosition(this->getPosition());427 effect->setOrientation(this->getOrientation());428 effect->setDestroyAfterLife(true);429 effect->setSource("orxonox/explosion_flame2");430 effect->setLifetime(5.0f);431 }432 {433 ParticleSpawner* effect = new ParticleSpawner(this->getContext());434 effect->setPosition(this->getPosition());435 effect->setOrientation(this->getOrientation());436 effect->setDestroyAfterLife(true);437 effect->setSource("orxonox/explosion_shockwave2");438 effect->scale(20);439 effect->setLifetime(5.0f);440 }{441 ParticleSpawner* effect = new ParticleSpawner(this->getContext());442 effect->setPosition(this->getPosition());443 effect->setOrientation(this->getOrientation());444 effect->setDestroyAfterLife(true);445 effect->setSource("orxonox/explosion_sparks2");446 effect->setLifetime(5.0f);447 }448 {449 ParticleSpawner* effect = new ParticleSpawner(this->getContext());450 effect->setPosition(this->getPosition());451 effect->setOrientation(this->getOrientation());452 effect->setDestroyAfterLife(true);453 effect->setSource("orxonox/explosion_streak2");454 effect->setLifetime(5.0f);455 }456 {457 ParticleSpawner* effect = new ParticleSpawner(this->getContext());458 effect->setPosition(this->getPosition());459 effect->setOrientation(this->getOrientation());460 effect->setDestroyAfterLife(true);461 effect->setSource("orxonox/explosion_afterglow");462 effect->scale(20);463 effect->setLifetime(5.0f);464 }465 466 467 for (unsigned int i = 0; i < this->numexplosionchunks_; ++i)468 {469 ExplosionChunk* chunk = new ExplosionChunk(this->getContext());470 chunk->setPosition(this->getPosition());471 }472 401 } 473 402 … … 476 405 Check whether the Pawn has a @ref Orxonox::WeaponSystem and fire it with the specified firemode if it has one. 477 406 */ 407 478 408 void Pawn::fired(unsigned int firemode) 479 409 { … … 488 418 this->spawneffect(); 489 419 } 420 421 422 void Pawn::addExplosionPart(ExplosionPart* ePart) 423 {this->explosionPartList_.push_back(ePart);} 424 425 426 ExplosionPart * Pawn::getExplosionPart() 427 {return this->explosionPartList_.back();} 428 429 490 430 491 431 /* WeaponSystem: -
code/branches/presentationHS15/src/orxonox/worldentities/pawns/Pawn.h
r10961 r10962 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 … … 142 144 virtual void fired(unsigned int firemode); 143 145 virtual void postSpawn(); 146 147 void addExplosionPart(ExplosionPart* ePart); 148 ExplosionPart * getExplosionPart(); 144 149 145 150 void addWeaponSlot(WeaponSlot * wSlot); … … 206 211 virtual Controller* getSlave(); 207 212 virtual void goWithStyle(); 208 virtual void deatheffect();209 213 virtual void spawneffect(); 210 214 … … 241 245 unsigned int numexplosionchunks_; 242 246 247 std::vector<ExplosionPart*> explosionPartList_; 248 243 249 private: 244 250 void registerVariables(); -
code/branches/presentationHS15/src/orxonox/worldentities/pawns/SpaceShip.cc
r10961 r10962 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.