Changeset 1694 for code/branches/gui/src/orxonox/objects/SpaceShipAI.cc
- Timestamp:
- Sep 1, 2008, 10:20:24 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gui/src/orxonox/objects/SpaceShipAI.cc
r1608 r1694 39 39 #include "core/XMLPort.h" 40 40 #include "tools/ParticleInterface.h" 41 #include "Settings.h" 41 42 42 43 #define ACTION_INTERVAL 1.0f … … 102 103 newenemy->XMLPort(xmlelement, XMLPort::LoadObject); 103 104 104 ParticleSpawner* spawneffect = new ParticleSpawner("Orxonox/fairytwirl", LODParticle::normal, 2.0, 0, 0, newenemy->getOrth()); 105 spawneffect->setPosition(newenemy->getPosition() - newenemy->getOrth() * 50); 106 spawneffect->create(); 105 if (Settings::showsGraphics()) 106 { 107 ParticleSpawner* spawneffect = new ParticleSpawner("Orxonox/fairytwirl", LODParticle::normal, 2.0, 0, 0, newenemy->getOrth()); 108 spawneffect->setPosition(newenemy->getPosition() - newenemy->getOrth() * 50); 109 spawneffect->create(); 110 } 107 111 } 108 112 } … … 182 186 void SpaceShipAI::kill() 183 187 { 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); 196 explosion->setPosition(this->getPosition()); 197 explosion->getParticleInterface()->setKeepParticlesInLocalSpace(true); 198 explosion->setScale(4); 199 explosion->create(); 200 201 Vector3 ringdirection = Vector3(rnd(), rnd(), rnd()); 202 ringdirection.normalise(); 203 explosion = new ParticleSpawner("Orxonox/BigExplosion1part3", LODParticle::normal, 3.0, 0.5, 0, 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, 0, ringdirection); 209 explosion->setPosition(this->getPosition()); 210 explosion->getParticleInterface()->setKeepParticlesInLocalSpace(true); 211 explosion->setScale(4); 212 explosion->create(); 188 if (Settings::showsGraphics()) 189 { 190 ParticleSpawner* explosion = new ParticleSpawner("Orxonox/BigExplosion1part1", LODParticle::low, 3.0); 191 explosion->setPosition(this->getPosition()); 192 explosion->getParticleInterface()->setKeepParticlesInLocalSpace(true); 193 explosion->setScale(4); 194 explosion->create(); 195 196 explosion = new ParticleSpawner("Orxonox/BigExplosion1part2", LODParticle::normal, 3.0); 197 explosion->setPosition(this->getPosition()); 198 explosion->getParticleInterface()->setKeepParticlesInLocalSpace(true); 199 explosion->setScale(4); 200 explosion->create(); 201 explosion = new ParticleSpawner("Orxonox/BigExplosion1part2", LODParticle::high, 3.0); 202 explosion->setPosition(this->getPosition()); 203 explosion->getParticleInterface()->setKeepParticlesInLocalSpace(true); 204 explosion->setScale(4); 205 explosion->create(); 206 207 Vector3 ringdirection = Vector3(rnd(), rnd(), rnd()); 208 ringdirection.normalise(); 209 explosion = new ParticleSpawner("Orxonox/BigExplosion1part3", LODParticle::normal, 3.0, 0.5, 0, ringdirection); 210 explosion->setPosition(this->getPosition()); 211 explosion->getParticleInterface()->setKeepParticlesInLocalSpace(true); 212 explosion->setScale(4); 213 explosion->create(); 214 explosion = new ParticleSpawner("Orxonox/BigExplosion1part3", LODParticle::high, 3.0, 0.5, 0, ringdirection); 215 explosion->setPosition(this->getPosition()); 216 explosion->getParticleInterface()->setKeepParticlesInLocalSpace(true); 217 explosion->setScale(4); 218 explosion->create(); 219 } 213 220 214 221 delete this;
Note: See TracChangeset
for help on using the changeset viewer.