Changeset 6950 in orxonox.OLD for branches/network/src
- Timestamp:
- Feb 1, 2006, 4:00:56 PM (19 years ago)
- Location:
- branches/network/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/world_entities/playable.cc
r6937 r6950 28 28 29 29 30 #include "dot_emitter.h" 31 #include "sprite_particles.h" 32 33 30 34 Playable::Playable() 31 35 { … … 43 47 44 48 this->setSynchronized(true); 49 50 51 this->emitter = new DotEmitter(100, 5, M_2_PI); 52 this->emitter->setParent(this); 53 this->emitter->setSpread(M_PI, M_PI); 54 this->emitter->setEmissionRate(300.0); 55 this->emitter->setEmissionVelocity(50.0); 56 57 this->explosionParticles = new SpriteParticles(1000); 58 this->explosionParticles->setName("LaserExplosionParticles"); 59 this->explosionParticles->setLifeSpan(.5, .3); 60 this->explosionParticles->setRadius(0.0, 10.0); 61 this->explosionParticles->setRadius(.5, 6.0); 62 this->explosionParticles->setRadius(1.0, 3.0); 63 this->explosionParticles->setColor(0.0, 1,1,0,.9); 64 this->explosionParticles->setColor(0.5, .8,.8,0,.5); 65 this->explosionParticles->setColor(1.0, .8,.8,.7,.0); 45 66 } 46 67 … … 106 127 // EXTREME HACK 107 128 if (this->getHealth() == 0.0f) 108 this->deactivateNode(); 129 { 130 //this->deactivateNode(); 131 this->emitter->setSystem(explosionParticles); 132 this->setAbsCoor(0, 0, 0); 133 this->setAbsDir(0, 1, 0); 134 } 109 135 } 110 136 -
branches/network/src/world_entities/playable.h
r6868 r6950 15 15 16 16 class Weapon; 17 17 class DotEmitter; 18 18 class Player; 19 class SpriteParticles; 19 20 20 21 //! Basic controllable WorldEntity … … 54 55 /** @return a List of Events in PEV_* sytle */ 55 56 inline const std::list<int>& getEventList() { return this->events; }; 56 57 57 58 int writeSync(const byte* data, int length, int sender); 58 59 int readSync(byte* data, int maxLength ); … … 74 75 int oldFlags; //!< Used for synchronisation 75 76 77 //HACK: explosion emitter 78 DotEmitter* emitter; 79 SpriteParticles* explosionParticles; 76 80 }; 77 81
Note: See TracChangeset
for help on using the changeset viewer.