Changeset 1563 for code/trunk/src/orxonox/objects
- Timestamp:
- Jun 7, 2008, 11:40:50 PM (17 years ago)
- Location:
- code/trunk/src/orxonox/objects
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/objects/ParticleProjectile.cc
r1560 r1563 43 43 if (this->owner_) 44 44 { 45 this->particles_ = new ParticleInterface("Orxonox/shot2" );45 this->particles_ = new ParticleInterface("Orxonox/shot2", LODParticle::normal); 46 46 this->particles_->addToSceneNode(this->getNode()); 47 47 this->particles_->getAllEmitters()->setDirection(-this->owner_->getInitialDir()); -
code/trunk/src/orxonox/objects/ParticleSpawner.cc
r1559 r1563 43 43 } 44 44 45 ParticleSpawner::ParticleSpawner(const std::string& templateName, float lifetime, float delay, const Vector3& direction)45 ParticleSpawner::ParticleSpawner(const std::string& templateName, LODParticle::LOD detaillevel, float lifetime, float delay, const Vector3& direction) 46 46 { 47 47 RegisterObject(ParticleSpawner); … … 50 50 executor->setDefaultValues(lifetime); 51 51 this->timer_.setTimer(delay, false, this, executor); 52 this->particle_ = new ParticleInterface(templateName );52 this->particle_ = new ParticleInterface(templateName, detaillevel); 53 53 this->particle_->addToSceneNode(this->getNode()); 54 54 this->particle_->setEnabled(false); -
code/trunk/src/orxonox/objects/ParticleSpawner.h
r1552 r1563 33 33 34 34 #include "WorldEntity.h" 35 #include " ../tools/Timer.h"35 #include "tools/Timer.h" 36 36 37 37 namespace orxonox … … 41 41 public: 42 42 ParticleSpawner(); 43 ParticleSpawner(const std::string& templateName, float lifetime, float delay = 0, const Vector3& direction = Vector3::ZERO);43 ParticleSpawner(const std::string& templateName, LODParticle::LOD detaillevel, float lifetime, float delay = 0, const Vector3& direction = Vector3::ZERO); 44 44 virtual ~ParticleSpawner(); 45 45 inline ParticleInterface* getParticleInterface() const -
code/trunk/src/orxonox/objects/Projectile.cc
r1558 r1563 97 97 if (it->isA(Class(SpaceShipAI))) 98 98 ((SpaceShipAI*)(*it))->damage(this->damage_); 99 ParticleSpawner* explosion = new ParticleSpawner(this->explosionTemplateName_, 2.0);99 ParticleSpawner* explosion = new ParticleSpawner(this->explosionTemplateName_, LODParticle::low, 2.0); 100 100 explosion->setPosition(this->getPosition()); 101 101 explosion->create(); 102 ParticleSpawner* smoke = new ParticleSpawner(this->smokeTemplateName_, 6.0, 0.0);102 ParticleSpawner* smoke = new ParticleSpawner(this->smokeTemplateName_, LODParticle::normal, 6.0, 0.0); 103 103 smoke->setPosition(this->getPosition()); 104 104 smoke->getParticleInterface()->setSpeedFactor(3.0); -
code/trunk/src/orxonox/objects/SpaceShip.cc
r1562 r1563 187 187 { 188 188 // START CREATING THRUSTER 189 this->tt1_ = new ParticleInterface("Orxonox/thruster1" );189 this->tt1_ = new ParticleInterface("Orxonox/thruster1", LODParticle::low); 190 190 this->tt1_->createNewEmitter(); 191 191 this->tt1_->getAllEmitters()->setDirection(-this->getInitialDir()); … … 199 199 tt1_->addToSceneNode(node2a); 200 200 201 this->tt2_ = new ParticleInterface("Orxonox/thruster2" );201 this->tt2_ = new ParticleInterface("Orxonox/thruster2", LODParticle::normal); 202 202 this->tt2_->createNewEmitter(); 203 203 this->tt2_->getAllEmitters()->setDirection(Vector3(-1, 0, 0)); -
code/trunk/src/orxonox/objects/SpaceShipAI.cc
r1562 r1563 102 102 newenemy->XMLPort(xmlelement, XMLPort::LoadObject); 103 103 104 ParticleSpawner* spawneffect = new ParticleSpawner("Orxonox/fairytwirl", 2.0, 0.0, newenemy->getOrth());104 ParticleSpawner* spawneffect = new ParticleSpawner("Orxonox/fairytwirl", LODParticle::normal, 2.0, 0.0, newenemy->getOrth()); 105 105 spawneffect->setPosition(newenemy->getPosition() - newenemy->getOrth() * 50); 106 106 spawneffect->create(); … … 182 182 void SpaceShipAI::kill() 183 183 { 184 ParticleSpawner* explosion = new ParticleSpawner("Orxonox/BigExplosion1part1", 3.0); 185 explosion->setPosition(this->getPosition()); 186 explosion->getParticleInterface()->setKeepParticlesInLocalSpace(true); 187 explosion->setScale(4); 188 explosion->create(); 189 190 explosion = new ParticleSpawner("Orxonox/BigExplosion1part2", 3.0); 184 ParticleSpawner* explosion = new ParticleSpawner("Orxonox/BigExplosion1part1", LODParticle::low, 3.0); 185 explosion->setPosition(this->getPosition()); 186 explosion->getParticleInterface()->setKeepParticlesInLocalSpace(true); 187 explosion->setScale(4); 188 explosion->create(); 189 190 explosion = new ParticleSpawner("Orxonox/BigExplosion1part2", LODParticle::normal, 3.0); 191 explosion->setPosition(this->getPosition()); 192 explosion->getParticleInterface()->setKeepParticlesInLocalSpace(true); 193 explosion->setScale(4); 194 explosion->create(); 195 explosion = new ParticleSpawner("Orxonox/BigExplosion1part2", LODParticle::high, 3.0); 191 196 explosion->setPosition(this->getPosition()); 192 197 explosion->getParticleInterface()->setKeepParticlesInLocalSpace(true); … … 196 201 Vector3 ringdirection = Vector3(rnd(), rnd(), rnd()); 197 202 ringdirection.normalise(); 198 explosion = new ParticleSpawner("Orxonox/BigExplosion1part3", 3.0, 0.5, ringdirection); 203 explosion = new ParticleSpawner("Orxonox/BigExplosion1part3", LODParticle::normal, 3.0, 0.5, ringdirection); 204 explosion->setPosition(this->getPosition()); 205 explosion->getParticleInterface()->setKeepParticlesInLocalSpace(true); 206 explosion->setScale(4); 207 explosion->create(); 208 explosion = new ParticleSpawner("Orxonox/BigExplosion1part3", LODParticle::high, 3.0, 0.5, ringdirection); 199 209 explosion->setPosition(this->getPosition()); 200 210 explosion->getParticleInterface()->setKeepParticlesInLocalSpace(true);
Note: See TracChangeset
for help on using the changeset viewer.