Changeset 2497 for code/branches/presentation/src/orxonox/objects/weaponSystem/projectiles/ParticleProjectile.cc
- Timestamp:
- Dec 17, 2008, 5:41:29 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation/src/orxonox/objects/weaponSystem/projectiles/ParticleProjectile.cc
r2493 r2497 33 33 #include <OgreParticleEmitter.h> 34 34 35 #include " ../../worldentities/pawns/SpaceShip.h"35 #include "core/Core.h" 36 36 #include "core/CoreIncludes.h" 37 37 #include "core/ConfigValueIncludes.h" … … 46 46 RegisterObject(ParticleProjectile); 47 47 48 this->particles_ = new ParticleInterface(this->getScene()->getSceneManager(), "Orxonox/shot3_small", LODParticle::normal); 49 this->attachOgreObject(this->particles_->getParticleSystem()); 50 this->particles_->setKeepParticlesInLocalSpace(0); 48 if (Core::showsGraphics()) 49 { 50 this->particles_ = new ParticleInterface(this->getScene()->getSceneManager(), "Orxonox/shot3_small", LODParticle::normal); 51 this->attachOgreObject(this->particles_->getParticleSystem()); 52 this->particles_->setKeepParticlesInLocalSpace(0); 51 53 52 this->particles_->getAllEmitters()->setDirection(-WorldEntity::FRONT); 53 /* 54 if (this->owner_) 55 { 54 this->particles_->getAllEmitters()->setDirection(-WorldEntity::FRONT); 56 55 } 57 // else 58 // { 59 // this->particles_ = 0; 60 // } 61 */ 62 63 this->setConfigValues(); 56 else 57 this->particles_ = 0; 64 58 } 65 59 … … 73 67 } 74 68 75 void ParticleProjectile::setConfigValues()76 {77 //SetConfigValue(speed_, 5000.0).description("The speed of a projectile in units per second").callback((Projectile*)this, &ParticleProjectile::speedChanged);78 }79 80 69 void ParticleProjectile::changedVisibility() 81 70 { 82 71 SUPER(ParticleProjectile, changedVisibility); 83 this->particles_->setEnabled(this->isVisible()); 72 73 if (this->particles_) 74 this->particles_->setEnabled(this->isVisible()); 84 75 } 85 76 }
Note: See TracChangeset
for help on using the changeset viewer.