示例#1
0
        public void Draw(OpenGL gl, float[] spectrumData)
        {
            _beatDetector.Detect(spectrumData[0]);

            List <Tuple <ParticleSystem, float, float, float> > particleSystemsToRemove = new List <Tuple <ParticleSystem, float, float, float> >();

            foreach (Tuple <ParticleSystem, float, float, float> particleSystemInfo in _activeParticleSystems)
            {
                if (particleSystemInfo.Item1.IsActive)
                {
                    particleSystemInfo.Item1.Draw(gl, particleSystemInfo.Item2, particleSystemInfo.Item3, particleSystemInfo.Item4, 0.0f, true);
                }
                else
                {
                    particleSystemsToRemove.Add(particleSystemInfo);
                }
            }

            particleSystemsToRemove.ForEach(ps => _activeParticleSystems.Remove(ps));
        }