Esempio n. 1
0
        public Particle(OpenGL _openGL)
        {
            openGL       = _openGL;
            particleData = new ParticleData();
            int iPaticleCount = particleData.MaxParticles;

            particleData.ParticleInit = false;

            particles = new ParticleEngine[iPaticleCount];

            SetTexture(particleData.Texture, particleData.CustomTexture);

            Random rndParticleStart = new Random();

            for (int i = 0; i < iPaticleCount; i++)
            {
                int iMinStart = 0;
                int iMaxStart = 3;

                float fStart = rndParticleStart.Next(iMinStart, iMaxStart);

                ParticleEngine particleEngine = new ParticleEngine(_openGL);
                particles[i] = particleEngine;
                particles[i].ParticleMove(fStart, true);
            }
        }
Esempio n. 2
0
        public void ParticleInit()
        {
            int iPaticleCount = particleData.MaxParticles;

            particleData.ParticleInit = false;
            particles = new ParticleEngine[iPaticleCount];
            texture   = new Texture();

            Random rndParticleStart = new Random();

            for (int i = 0; i < iPaticleCount; i++)
            {
                ParticleEngine particleEngine = new ParticleEngine(openGL);
                particles[i] = particleEngine;

                int iMinStart = 0;
                int iMaxStart = 3;

                float fStart = rndParticleStart.Next(iMinStart, iMaxStart);

                particles[i].ParticleMove(fStart, true);
            }
        }