Beispiel #1
0
 public void Add(Vector2 Position, Vector2 Speed, float Rotation, Color NewColor, float SizeMult)
 {
     if (ParticleQeue.Count() > 0)
     {
         BasicParticle p = ParticleQeue.Dequeue();
         p.Start(Position, Speed, Rotation, NewColor, SizeMult);
     }
 }
Beispiel #2
0
 public void Add(Vector2 Position, Vector2 Speed, float Rotation)
 {
     if (ParticleQeue.Count() > 0)
     {
         BasicParticle p = ParticleQeue.Dequeue();
         p.Start(Position, Speed, Rotation);
     }
 }
Beispiel #3
0
        public void Load()
        {
            if (MyBlendState == BlendState.AlphaBlend)
            {
                AlphaParticles.Add(this);
            }
            else
            {
                AddativeParticles.Add(this);
            }

            if (MyTexture == null)
            {
                MyTexture = Game1.contentManager.Load <Texture2D>("Game/Particles/" + MyTexturePath);

                for (int i = 0; i < Particles.Count(); i++)
                {
                    Particles[i] = new BasicParticle(this, StartSize, EndSize, Rot, RotSpeed, MaxLifeTime, MyTexture, Gravity, MyColor);
                }
            }
            Reset();
        }
Beispiel #4
0
 public void Remove(BasicParticle Particle)
 {
     Particle.Reset();
     ParticleQeue.Enqueue(Particle);
 }