Example #1
0
 public static ParticleRenderer GetInstance(GraphicsDevice device)
 {
     if (instance == null)
     {
         instance = new ParticleRenderer(device);
     }
     return(instance);
 }
Example #2
0
        public void Draw(GraphicsDevice device, Camera camera)
        {
            ParticleRenderer particlerenderer = ParticleRenderer.GetInstance(device);

            particlerenderer.Begin(camera);

            for (int i = 0; i < particle_array.Length; i++)
            {
                Particle particle = particle_array[i];

                if (particle.is_alive)
                {
                    particle.UpdateWorldMatrix(camera);
                    particlerenderer.Add(particle);
                }
            }

            particlerenderer.End();
        }
Example #3
0
 public static ParticleRenderer GetInstance(GraphicsDevice device)
 {
     if (instance == null)
         instance = new ParticleRenderer(device);
     return instance;
 }