Exemplo n.º 1
0
        private void miParticle_Click(object sender, System.EventArgs e)
        {
            if (m_particleControl == null)
            {
                //MemberSpriteBitmap mbParticle = (MemberSpriteBitmap)EndogineHub.Instance.CastLib.GetOrCreate("Particle");
                //mbParticle.CenterRegPoint();

                m_particleSystem = new FunParticleSystem();
                m_particleSystem.ParticlePicRef = PicRef.GetOrCreate("Particle");
                m_particleSystem.Ink            = RasterOps.ROPs.AddPin;        //Difference looks nice (only works properly in GDI mode);
                m_particleSystem.SourceRect     = new ERectangle(0, 0, 50, 50); //how big is the emitter
                m_particleSystem.LocZ           = 100;

                m_particleControl = new ParticleControl(m_particleSystem);
            }
            else
            {
                m_particleControl.Dispose();
                m_particleControl = null;

                m_particleSystem.Dispose();
            }
        }
Exemplo n.º 2
0
        private void miParticle_Click(object sender, System.EventArgs e)
        {
            if (m_particleControl == null)
            {
                //MemberSpriteBitmap mbParticle = (MemberSpriteBitmap)EndogineHub.Instance.CastLib.GetOrCreate("Particle");
                //mbParticle.CenterRegPoint();

                m_particleSystem = new FunParticleSystem();
                m_particleSystem.ParticlePicRef = PicRef.GetOrCreate("Particle");
                m_particleSystem.Ink = RasterOps.ROPs.AddPin; //Difference looks nice (only works properly in GDI mode);
                m_particleSystem.SourceRect = new ERectangle(0, 0, 50, 50); //how big is the emitter
                m_particleSystem.LocZ = 100;

                m_particleControl = new ParticleControl(m_particleSystem);
            }
            else
            {
                m_particleControl.Dispose();
                m_particleControl = null;

                m_particleSystem.Dispose();
            }
        }