Changeset 10963 for code/branches/presentationHS15/src/modules
- Timestamp:
- Dec 9, 2015, 4:56:39 PM (9 years ago)
- Location:
- code/branches/presentationHS15
- Files:
-
- 8 edited
- 6 copied
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentationHS15
- Property svn:mergeinfo changed
/code/branches/particleEffectsHS15 (added) merged: 10644,10671,10706,10836,10889,10897,10901,10908,10911,10944,10948
- Property svn:mergeinfo changed
-
code/branches/presentationHS15/src/modules/weapons/WeaponsPrereqs.h
r10961 r10963 102 102 class LaserFire; 103 103 class LightningGun; 104 class MineGun; 104 105 class RocketFire; 105 106 class RocketFireOld; -
code/branches/presentationHS15/src/modules/weapons/munitions/CMakeLists.txt
r10961 r10963 7 7 IceMunition.cc 8 8 SplitMunition.cc 9 MineMunition.cc 9 10 ) -
code/branches/presentationHS15/src/modules/weapons/munitions/MineMunition.cc
r10962 r10963 45 45 this->maxMunitionPerMagazine_ = 1; 46 46 this->maxMagazines_ = 100; 47 this-> magazines_ = 25;47 this->unassignedMagazines_ = 25; 48 48 49 this->bUseSeparateMagazines_ = false; 50 this->bStackMunition_ = true; 49 this->deployment_ = MunitionDeployment::Stack; 51 50 52 51 this->bAllowMunitionRefilling_ = true; 53 52 this->bAllowMultiMunitionRemovementUnderflow_ = false; 53 54 this->reloadTime_ = 0.5f; 55 } 56 57 void MineMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode) 58 { 59 SUPER(MineMunition, XMLPort, xmlelement, mode); 54 60 } 55 61 } -
code/branches/presentationHS15/src/modules/weapons/munitions/MineMunition.h
r10962 r10963 53 53 MineMunition(Context* context); 54 54 virtual ~MineMunition() {} 55 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 55 56 }; 56 57 } -
code/branches/presentationHS15/src/modules/weapons/projectiles/CMakeLists.txt
r10629 r10963 12 12 GravityBomb.cc 13 13 GravityBombField.cc 14 MineProjectile.cc 14 15 ) -
code/branches/presentationHS15/src/modules/weapons/projectiles/IceGunProjectile.cc
r10629 r10963 34 34 #include "IceGunProjectile.h" 35 35 36 #include <OgreSceneManager.h> 37 #include <OgreSceneNode.h> 38 36 39 #include "core/CoreIncludes.h" 37 40 #include "graphics/Model.h" 41 #include "graphics/ParticleSpawner.h" 42 #include "Scene.h" 43 #include "core/command/Executor.h" 44 #include "tools/ParticleInterface.h" 38 45 39 46 namespace orxonox 40 47 { 41 48 RegisterClass(IceGunProjectile); 49 50 const float IceGunProjectile::particleDestructionDelay_ = 15.0f; 42 51 43 52 IceGunProjectile::IceGunProjectile(Context* context) : Projectile(context) … … 55 64 this->attach(model); 56 65 model->setPosition(Vector3(0,0,0)); 66 67 // Add effect. 68 emitter_ = new ParticleEmitter(this->getContext()); 69 this->attach(emitter_); 70 emitter_->setOrientation(this->getOrientation()); 71 emitter_->setSource("Orxonox/ice"); 72 emitter_->setDeleteWithParent(false); 73 } 74 75 IceGunProjectile::~IceGunProjectile() 76 { 77 if (this->isInitialized()) 78 { 79 const Vector3& pos = emitter_->getWorldPosition(); 80 const Quaternion& rot = emitter_->getWorldOrientation(); 81 this->detach(emitter_); 82 emitter_->setPosition(pos); 83 emitter_->setOrientation(rot); 84 emitter_->getParticleInterface()->setEnabled(false); 85 this->getScene()->getRootSceneNode()->addChild(const_cast<Ogre::SceneNode*>(emitter_->getNode())); 86 87 const ExecutorPtr& executor = createExecutor(createFunctor(&ParticleEmitter::destroy, emitter_)); 88 new Timer(particleDestructionDelay_, false, executor, true); 89 } 57 90 } 58 91 -
code/branches/presentationHS15/src/modules/weapons/projectiles/IceGunProjectile.h
r10629 r10963 56 56 public: 57 57 IceGunProjectile(Context* context); 58 virtual ~IceGunProjectile() {}58 virtual ~IceGunProjectile(); 59 59 60 60 virtual void setFreezeTime(float freezeTime); … … 63 63 protected: 64 64 virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint); 65 private: 65 static const float particleDestructionDelay_; 66 private: 67 ParticleEmitter* emitter_; 66 68 float freezeTime_; //The duration of the freezing effect on a target 67 69 float freezeFactor_; //The strength of the freezing effect -
code/branches/presentationHS15/src/modules/weapons/projectiles/Projectile.h
r10629 r10963 69 69 protected: 70 70 virtual void setCollisionShapeRadius(float radius); 71 float lifetime_; //!< The time the projectile exists. 71 72 72 73 private: 73 float lifetime_; //!< The time the projectile exists.74 74 Timer destroyTimer_; //!< Timer to destroy the projectile after its lifetime has run out. 75 WeakPtr<SphereCollisionShape> collisionShape_; // The collision shape of the projectile. 75 WeakPtr<SphereCollisionShape> collisionShape_; // The collision shape of the projectile. 76 76 }; 77 77 } -
code/branches/presentationHS15/src/modules/weapons/weaponmodes/CMakeLists.txt
r10629 r10963 11 11 SimpleRocketFire.cc 12 12 GravityBombFire.cc 13 MineGun.cc 13 14 )
Note: See TracChangeset
for help on using the changeset viewer.