Exemple #1
0
        void frame_MouseClick(Element sender, MouseEventArgs e)
        {
            if (e.isClicked(MouseButtons.Right))
            {
                var pfire = new ParticleSystem(new Vector2(e.CurrentMouseState.X, e.CurrentMouseState.Y), 15, 100, 1, 10, 1, 3f, fire);
                pfire.InitVelocities(0, 110);
                PE.AddParticleSystem(pfire);

                var psmoke = new ParticleSystem(new Vector2(e.CurrentMouseState.X, e.CurrentMouseState.Y), 25, 100, 2f, 20, 1, 1f, smoke);
                psmoke.InitVelocities(0, 200);
                PE.AddParticleSystem(psmoke);
            }
            else if (e.isClicked(MouseButtons.Left))
            {
                PE.AddParticleSystems(ParticleSystemFactory.GetDirtyBomb(new Vector2(e.CurrentMouseState.X, e.CurrentMouseState.Y), 50));
            }
        }