Changeset 6821 in orxonox.OLD for trunk/src/world_entities
- Timestamp:
- Jan 29, 2006, 12:57:24 AM (19 years ago)
- Location:
- trunk/src/world_entities/projectiles
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/projectiles/hyperblast.cc
r6813 r6821 44 44 this->setMinEnergy(1); 45 45 this->setHealthMax(10); 46 this->lifeSpan = 5; 46 this->lifeSpan = 1; 47 this->size = 4.0; 47 48 48 49 this->emitter = new ParticleEmitter(Vector(0,1,0), M_2_PI, 100, 5); 50 this->emitter->setType( EMITTER_CUBE ); 51 this->emitter->setSize(10); 49 52 this->emitter->setParent(this); 50 53 this->emitter->setSpread(M_PI, M_PI); … … 73 76 Hyperblast::explosionParticles = new SparkParticles(2000); 74 77 Hyperblast::explosionParticles->setName("HyperblastExplosionParticles"); 75 Hyperblast::explosionParticles->setLifeSpan( 5, .3);76 Hyperblast::explosionParticles->setRadius( 100.0, 10);77 Hyperblast::explosionParticles->setRadius( 20, 15.0);78 Hyperblast::explosionParticles->setRadius( 50.0, 10.0);79 Hyperblast::explosionParticles->setColor(0.0, 0,1,0,1);80 Hyperblast::explosionParticles->setColor(0.5, .8,. 8,0,.99);81 Hyperblast::explosionParticles->setColor(0.8, .8,. 8,.3,.99);78 Hyperblast::explosionParticles->setLifeSpan(2, .3); 79 Hyperblast::explosionParticles->setRadius(0.1, .1); 80 Hyperblast::explosionParticles->setRadius(0.2, .2); 81 Hyperblast::explosionParticles->setRadius(1.0, .1); 82 Hyperblast::explosionParticles->setColor(0.0, 1.0, .6, 0 ,1); 83 Hyperblast::explosionParticles->setColor(0.5, .8,.1,0,.6); 84 Hyperblast::explosionParticles->setColor(0.8, .8,.2,.3,.3); 82 85 Hyperblast::explosionParticles->setColor(1.0, 1,1,1,.0); 83 86 } 84 87 85 88 this->emitter->setSystem(Hyperblast::explosionParticles); 89 this->size = 4.0; 86 90 87 91 Hyperblast::explosionParticles->debug(); 88 92 this->updateNode(0); 89 this->emitter->setEmissionRate( 245.0);90 this->emitter->setEmissionVelocity( 10.0);93 this->emitter->setEmissionRate(5000.0); 94 this->emitter->setEmissionVelocity(50.0); 91 95 } 92 96 … … 116 120 if(this->tickLifeCycle(dt)) 117 121 this->deactivate(); 122 123 this->size *=(1 - (5.0*dt)); 124 125 if (this->lifeCycle > .1 && this->emitter->getEmissionRate() > 10.0) 126 this->emitter->setEmissionRate(0.0); 118 127 } 119 128 … … 138 147 this->getAbsDir().matrix (matrix); 139 148 glMultMatrixf((float*)matrix); 140 glScalef(2.0, 2.0, 2.0);149 glScalef(2.0, this->size, this->size); 141 150 this->getModel()->draw(); 142 151 -
trunk/src/world_entities/projectiles/hyperblast.h
r6811 r6821 38 38 39 39 ParticleEmitter* emitter; 40 float size; 40 41 41 42 WorldEntity* hitEntity; // FIXME TEMPORARY
Note: See TracChangeset
for help on using the changeset viewer.