Changeset 9900
- Timestamp:
- Dec 16, 2013, 1:33:09 PM (11 years ago)
- Location:
- code/branches/presentationHS13
- Files:
-
- 9 edited
- 28 copied
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentationHS13
- Property svn:mergeinfo changed
/code/branches/invaders (added) merged: 9694,9698,9701-9702,9709,9724-9725,9744,9777,9793,9828-9829,9837,9854,9858-9859,9862,9866,9868-9869,9871,9874-9875,9879,9884
- Property svn:mergeinfo changed
-
code/branches/presentationHS13/src/modules/CMakeLists.txt
r9348 r9900 39 39 ADD_SUBDIRECTORY(docking) 40 40 ADD_SUBDIRECTORY(towerdefense) 41 ADD_SUBDIRECTORY(invader) -
code/branches/presentationHS13/src/modules/weapons/weaponmodes/HsW01.h
r9667 r9900 59 59 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 60 60 61 pr ivate:61 protected: 62 62 /** 63 63 @brief Set the mesh. … … 109 109 { return this->delay_; } 110 110 111 v oid shot();111 virtual void shot(); 112 112 void muzzleflash(); 113 113 -
code/branches/presentationHS13/src/orxonox/gametypes/Gametype.cc
r9667 r9900 171 171 entity->setOrientation(oldentity->getWorldOrientation()); 172 172 } 173 174 173 it->first->startControl(entity); 175 174 } -
code/branches/presentationHS13/src/orxonox/graphics/ParticleEmitter.cc
r9667 r9900 45 45 RegisterClass(ParticleEmitter); 46 46 47 ParticleEmitter::ParticleEmitter(Context* context) : StaticEntity(context)47 ParticleEmitter::ParticleEmitter(Context* context) : MovableEntity(context) 48 48 { 49 49 RegisterObject(ParticleEmitter); -
code/branches/presentationHS13/src/orxonox/graphics/ParticleEmitter.h
r9667 r9900 33 33 34 34 #include <string> 35 #include "worldentities/ StaticEntity.h"35 #include "worldentities/MovableEntity.h" 36 36 37 37 namespace orxonox 38 38 { 39 class _OrxonoxExport ParticleEmitter : public StaticEntity39 class _OrxonoxExport ParticleEmitter : public MovableEntity 40 40 { 41 41 public: -
code/branches/presentationHS13/src/orxonox/worldentities/BigExplosion.cc
r9667 r9900 43 43 RegisterClass(BigExplosion); 44 44 45 BigExplosion::BigExplosion(Context* context) : StaticEntity(context)45 BigExplosion::BigExplosion(Context* context) : MobileEntity(context) 46 46 { 47 47 RegisterObject(BigExplosion); 48 49 if ( GameMode::showsGraphics() && ( !this->getScene() || !this->getScene()->getSceneManager() ) ) 50 ThrowException(AbortLoading, "Can't create BigExplosion, no scene or no scene manager given."); 51 52 this->bStop_ = false; 53 this->LOD_ = LODParticle::Normal; 54 55 if ( GameMode::showsGraphics() ) 56 { 57 try 58 { 59 this->init(); 60 } 61 catch (const std::exception& ex) 62 { 63 orxout(internal_error) << "Couldn't load particle effect in BigExplosion: " << ex.what() << endl; 64 this->initZero(); 65 } 66 } 67 else 68 { 69 this->initZero(); 70 } 71 72 if (GameMode::isMaster()) 73 { 74 this->destroyTimer_.setTimer(rnd(2, 4), false, createExecutor(createFunctor(&BigExplosion::stop, this))); 75 } 76 77 this->registerVariables(); 78 } 79 80 BigExplosion::BigExplosion(Context* context, Vector3 initVelocity) : MobileEntity(context) 81 { 82 RegisterObject(BigExplosion); 83 this->setVelocity(initVelocity); 48 84 49 85 if ( GameMode::showsGraphics() && ( !this->getScene() || !this->getScene()->getSceneManager() ) ) … … 100 136 this->debris4_->setSyncMode(0); 101 137 102 this->explosion_ = new StaticEntity(this->getContext());138 this->explosion_ = new MobileEntity(this->getContext()); 103 139 this->explosion_->setSyncMode(0); 104 140 … … 148 184 this->debrisEntity4_->attach(debris4_); 149 185 186 // /////////////////////// 187 // TODO: particleSpawner is a static entity. It should probably be dynamic, for better explosions. 188 // 150 189 ParticleSpawner* effect = new ParticleSpawner(this->getContext()); 190 orxout() << "vel " << this->getVelocity() << endl; 191 // effect->setVelocity(this->getVelocity()); 151 192 effect->setDestroyAfterLife(true); 152 193 effect->setSource("Orxonox/explosion2b"); … … 155 196 156 197 ParticleSpawner* effect2 = new ParticleSpawner(this->getContext()); 198 // effect2->setVelocity(Vector3(rnd(-1, 1), rnd(-1, 1), rnd(-1, 1))*rnd(10, 200)); 157 199 effect2->setDestroyAfterLife(true); 158 200 effect2->setSource("Orxonox/smoke6"); -
code/branches/presentationHS13/src/orxonox/worldentities/BigExplosion.h
r9667 r9900 22 22 * Author: 23 23 * Benjamin de Capitani 24 * Co-authors: 24 * Co-authors:§ 25 25 * ... 26 26 * … … 33 33 34 34 #include "tools/Timer.h" 35 #include " StaticEntity.h"35 #include "MobileEntity.h" 36 36 37 37 namespace orxonox 38 38 { 39 class _OrxonoxExport BigExplosion : public StaticEntity39 class _OrxonoxExport BigExplosion : public MobileEntity 40 40 { 41 41 public: 42 42 BigExplosion(Context* context); 43 BigExplosion(Context* context, Vector3 initVelocity); 43 44 virtual ~BigExplosion(); 44 45 … … 60 61 bool bStop_; 61 62 62 StaticEntity* explosion_;63 MobileEntity* explosion_; 63 64 64 65 MovableEntity* debrisEntity1_; -
code/branches/presentationHS13/src/orxonox/worldentities/pawns/Pawn.cc
r9667 r9900 365 365 this->setDestroyWhenPlayerLeft(false); 366 366 367 BigExplosion* chunk = new BigExplosion(this->getContext()); 367 orxout() << "big explosion: " << this->getVelocity() << endl; 368 BigExplosion* chunk = new BigExplosion(this->getContext(), this->getVelocity()); 368 369 chunk->setPosition(this->getPosition()); 370 // chunk->setVelocity(this->getVelocity()); 369 371 370 372 } … … 376 378 effect->setPosition(this->getPosition()); 377 379 effect->setOrientation(this->getOrientation()); 380 effect->setVelocity(this->getVelocity()); 378 381 effect->setDestroyAfterLife(true); 379 382 effect->setSource("Orxonox/explosion2b"); … … 384 387 effect->setPosition(this->getPosition()); 385 388 effect->setOrientation(this->getOrientation()); 389 effect->setVelocity(this->getVelocity()); 386 390 effect->setDestroyAfterLife(true); 387 391 effect->setSource("Orxonox/smoke6"); … … 392 396 effect->setPosition(this->getPosition()); 393 397 effect->setOrientation(this->getOrientation()); 398 effect->setVelocity(this->getVelocity()); 394 399 effect->setDestroyAfterLife(true); 395 400 effect->setSource("Orxonox/sparks");
Note: See TracChangeset
for help on using the changeset viewer.