- Timestamp:
- Oct 29, 2005, 11:55:41 AM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/particles/particle_system.cc
r5445 r5446 27 27 #include "material.h" 28 28 #include "state.h" 29 #include "shell_command.h" 29 30 30 31 #include "tinyxml.h" 31 32 32 33 CREATE_FACTORY(ParticleSystem); 33 34 SHELL_COMMAND(texture, ParticleSystem, setMaterialTexture) 35 ->defaultValues(1, "maps/evil-flower.png"); 34 36 35 37 using namespace std; … … 176 178 * @param particleType the type of particles in this System 177 179 * @param count how many particles (in PARTICLE_MULTI-mode) 178 @todo this willbe different180 @todo this MUST be different 179 181 */ 180 182 void ParticleSystem::setType(PARTICLE_TYPE particleType, int count) … … 214 216 { 215 217 this->material = material; 218 } 219 220 void ParticleSystem::setMaterialTexture(const char* textureFile) 221 { 222 if (this->material != NULL) 223 this->material->setDiffuseMap(textureFile); 216 224 } 217 225 -
trunk/src/lib/particles/particle_system.h
r5405 r5446 79 79 void setType(PARTICLE_TYPE particleType, int count = 0); 80 80 void setMaterial(Material* material); 81 void setMaterialTexture(const char* textureFile); 81 82 void setModel(const char* modelName = NULL); 82 83 void setLifeSpan(float lifeSpan, float randomLifeSpan = 0.0); -
trunk/src/world_entities/weapons/test_bullet.cc
r5445 r5446 64 64 TestBullet::~TestBullet () 65 65 { 66 //delete this->emitter;66 // delete this->emitter; 67 67 68 68 /* this is normaly done by World.cc by deleting the ParticleEngine */ … … 72 72 delete TestBullet::explosionParticles; 73 73 TestBullet::explosionParticles = NULL; 74 printf("-------------------\n");75 74 } 76 75 … … 86 85 { 87 86 ClassList::debug(3, CL_PARTICLE_SYSTEM); 88 TestBullet::explosionParticles = new ParticleSystem(1000 0, PARTICLE_SPRITE);87 TestBullet::explosionParticles = new ParticleSystem(1000, PARTICLE_SPRITE); 89 88 TestBullet::explosionParticles->setName("TestBulletTrailParticles"); 90 TestBullet::explosionParticles->setLifeSpan(.5 );89 TestBullet::explosionParticles->setLifeSpan(.5, .3); 91 90 TestBullet::explosionParticles->setRadius(0.0, .5); 92 91 TestBullet::explosionParticles->setRadius(0.5, 2.0); 93 TestBullet::explosionParticles->setRadius( 0.0, 0.0);92 TestBullet::explosionParticles->setRadius(1.0, 5.0); 94 93 TestBullet::explosionParticles->setColor(0.0, 1,0,0,.7); 95 94 TestBullet::explosionParticles->setColor(0.5, .8,.8,0,.5); 96 TestBullet::explosionParticles->setColor(1.0, .5,.5,.5,.0); 97 printf("::::::::::::::::::::::::::::\n"); 95 TestBullet::explosionParticles->setColor(1.0, .7,.7,.7,.0); 98 96 } 99 97
Note: See TracChangeset
for help on using the changeset viewer.