Changeset 6756 in orxonox.OLD for trunk/src/world_entities/space_ships
- Timestamp:
- Jan 26, 2006, 1:55:40 AM (19 years ago)
- Location:
- trunk/src/world_entities/space_ships
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/space_ships/space_ship.cc
r6753 r6756 27 27 #include "weapons/turret.h" 28 28 #include "weapons/cannon.h" 29 30 #include "particle_emitter.h" 31 #include "sprite_particles.h" 29 32 30 33 #include "factory.h" … … 210 213 211 214 dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( false); 215 216 this->burstEmitter = new ParticleEmitter(Vector(-1,0,0), 1, 200, 0.0); 217 this->burstEmitter->setParent(this); 218 this->burstEmitter->setName("SpaceShip_Burst_emitter"); 219 220 221 this->burstSystem = new SpriteParticles(1000); 222 this->burstSystem->addEmitter(this->burstEmitter); 223 this->burstSystem->setName("SpaceShip_Burst_System"); 224 ((SpriteParticles*)this->burstSystem)->setMaterialTexture("maps/radial-trans-noise.png"); 225 this->burstSystem->setLifeSpan(1.0, .3); 226 this->burstSystem->setRadius(0.0, 2.0); 227 this->burstSystem->setRadius(0.05, 3.0); 228 this->burstSystem->setRadius(.5, .8); 229 this->burstSystem->setRadius(1.0, .8); 230 this->burstSystem->setColor(0.0, 1,0,0,.7); 231 this->burstSystem->setColor(0.2, .8,.8,0,.5); 232 this->burstSystem->setColor(0.5, .8,.8,.8,.8); 233 this->burstSystem->setColor(1.0, .8,.8,.8,.0); 234 212 235 } 213 236 … … 219 242 void SpaceShip::loadParams(const TiXmlElement* root) 220 243 { 221 WorldEntity::loadParams(root);244 Playable::loadParams(root); 222 245 } 223 246 … … 315 338 velocity += ((this->getAbsDirX())*travelSpeed-velocity)*airViscosity; 316 339 velocity = (velocity.getNormalized())*travelSpeed; 340 this->burstEmitter->setEmissionRate(travelSpeed); 317 341 318 342 //orient the spaceship in direction of the mouse -
trunk/src/world_entities/space_ships/space_ship.h
r6737 r6756 10 10 #include "extendable.h" 11 11 12 12 // Forward Declaration 13 13 template<class T> class tList; 14 14 class Vector; 15 15 class Event; 16 class ParticleEmitter; 17 class ParticleSystem; 16 18 17 19 class SpaceShip : public Playable … … 83 85 int oldMask; 84 86 87 ParticleEmitter* burstEmitter; 88 ParticleSystem* burstSystem; 85 89 }; 86 90
Note: See TracChangeset
for help on using the changeset viewer.