Exemple #1
0
 public ParticleEmitter(ParticleEmitterSettings settings)
 {
     this.settings = settings;
     spawnTimer    = new TimerTrig(settings.frequency.Random());
     particles     = new Pool <Particle>(settings.capacity);
     Reset();
 }
 public void Set(ParticleEmitterSettings settings)
 {
     this.blendState = settings.blendState;
     this.frequency.Set(settings.frequency);
     this.lifeTime.Set(settings.lifeTime);
     this.startColor.Set(settings.startColor);
     this.endColor.Set(settings.endColor);
     this.position.Set(settings.position);
     this.velocity.Set(settings.velocity);
     this.startScale.Set(settings.startScale);
     this.endScale.Set(settings.endScale);
     this.gravity.Set(settings.gravity);
     this.rotation.Set(settings.rotation);
     this.sources  = settings.sources;
     this.loop     = settings.loop;
     this.capacity = settings.capacity;
     this.Name     = settings.Name;
 }