//-- New Particle System private void button2_Click(object sender, EventArgs e) { DialogResult result = MessageBox.Show(String.Format("You are about to create a new Particle Effect. Do want to save the current one?"), "Warning!", MessageBoxButtons.YesNoCancel); if (result == DialogResult.Cancel) { return; } if (result == DialogResult.Yes) { SaveParticleSystem(); } mEffect = new ParticleEffect(); //-- add one emitter by default addEmitter(); bindData(0); SetTabName("NewParticleEffect"); refreshTreeView(true); }
public void Update(ParticleEffect effect) { this.burstTimer -= Time.MsPFMult * Time.TimeMult; while (this.burstTimer <= 0.0f && (this.burstCount < this.maxBurstCount || this.maxBurstCount < 0)) { this.burstTimer += MathF.Rnd.NextFloat(this.burstDelay.MinValue, this.burstDelay.MaxValue); this.burstCount++; int count = MathF.Rnd.Next((int)this.burstParticleNum.MinValue, (int)this.burstParticleNum.MaxValue); effect.AddParticles(this, count); } }