Changeset 6811 in orxonox.OLD for trunk/src/world_entities/projectiles
- Timestamp:
- Jan 28, 2006, 4:02:06 PM (19 years ago)
- Location:
- trunk/src/world_entities/projectiles
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/projectiles/hyperblast.cc
r6810 r6811 40 40 41 41 float modelSize = .3; 42 this->loadModel("models/projectiles/ orx-hyperblast.obj", .3);42 this->loadModel("models/projectiles/hyperblast.obj", 5); 43 43 44 44 this->setMinEnergy(1); … … 58 58 { 59 59 /* this is normaly done by World.cc by deleting the ParticleEngine */ 60 if (Hyperblast::extParticles != NULL && ClassList::getList(CL_HYPERBLAST)->size() <= 1)61 {62 Hyperblast::extParticles = NULL;63 }64 60 if (Hyperblast::explosionParticles != NULL && ClassList::getList(CL_HYPERBLAST)->size() <= 1) 65 61 { … … 69 65 } 70 66 71 SpriteParticles* Hyperblast::extParticles = NULL;72 67 SparkParticles* Hyperblast::explosionParticles = NULL; 73 68 74 69 void Hyperblast::activate() 75 70 { 76 if (unlikely(Hyperblast::extParticles == NULL))77 {78 Hyperblast::extParticles = new SpriteParticles(2000);79 Hyperblast::extParticles->setName("HyperblastTrailParticles");80 Hyperblast::extParticles->setMaterialTexture("maps/radial-trans-noise.png");81 Hyperblast::extParticles->setLifeSpan(1.0, .3);82 Hyperblast::extParticles->setRadius(0.0, .5);83 Hyperblast::extParticles->setRadius(0.2, 2.0);84 Hyperblast::extParticles->setRadius(.5, .8);85 Hyperblast::extParticles->setRadius(1.0, .8);86 Hyperblast::extParticles->setColor(0.0, 1,0,0,.7);87 Hyperblast::extParticles->setColor(0.2, .8,.8,0,.5);88 Hyperblast::extParticles->setColor(0.5, .8,.8,.8,.8);89 Hyperblast::extParticles->setColor(1.0, .8,.8,.8,.0);90 }91 71 if (unlikely(Hyperblast::explosionParticles == NULL)) 92 72 { … … 103 83 } 104 84 105 this->emitter->setSystem(Hyperblast::ex tParticles);85 this->emitter->setSystem(Hyperblast::explosionParticles); 106 86 107 87 this->updateNode(0); 108 this->emitter->setEmissionRate( 45.0);88 this->emitter->setEmissionRate(245.0); 109 89 this->emitter->setEmissionVelocity(0.0); 110 90 } … … 125 105 void Hyperblast::collidesWith(WorldEntity* entity, const Vector& location) 126 106 { 127 if (this->hitEntity != entity)128 this->destroy();129 this->hitEntity = entity;130 107 } 131 108 … … 136 113 void Hyperblast::tick (float dt) 137 114 { 138 //Vector v = *this->flightDirection * ( this->speed * time * 1000 + 0.1);139 Vector v = this->velocity * (dt);140 this->shiftCoor(v);141 142 115 if(this->tickLifeCycle(dt)) 143 116 this->deactivate(); … … 150 123 { 151 124 PRINTF(5)("DESTROY Hyperblast\n"); 152 this->lifeCycle = .95; //!< @todo calculate this usefully.153 this->emitter->setSystem(Hyperblast::explosionParticles);154 125 155 this->emitter->setEmissionRate(1000.0);156 this->emitter->setEmissionVelocity(50.0);157 // this->deactivate();158 126 159 127 } -
trunk/src/world_entities/projectiles/hyperblast.h
r6810 r6811 11 11 class Vector; 12 12 class Weapon; 13 class SpriteParticles;14 13 class SparkParticles; 15 14 class ParticleEmitter; … … 36 35 private: 37 36 static FastFactory* fastFactory; 38 static SpriteParticles* extParticles;39 37 static SparkParticles* explosionParticles; 40 38
Note: See TracChangeset
for help on using the changeset viewer.