Exemple #1
0
 public void EmitParticles(Vector2 position, ParticlePreset preset)
 {
     for (int i = 0; i < preset.burstCount; i++)
     {
         particleList.Add(new Particle(this, position, preset));
     }
 }
Exemple #2
0
        public Particle(ParticleEngine engine, Vector2 startPos, ParticlePreset preset)
        {
            e = engine;
            settings = preset;
            pos = startPos;
            dir = PickRandomDirection();
            vel = Main.random.Next(settings.minVel, settings.maxVel);

            liveTime = settings.liveTime;
        }