Ejemplo n.º 1
0
        private void OnTouch(object sender, TouchTracking.TouchActionEventArgs args)
        {
            if (args.Type == TouchTracking.TouchActionType.Pressed)
            {
                var x = args.Location.X * _density;
                var y = args.Location.Y * _density;

                var ppi     = new PointParticleInitializer(new Window(Height, Width), new Vector2((float)x, (float)y));
                var emitter = new Emitter <SKParticle2D>(ppi, 100)
                {
                    //AvgLife = 5,
                    Forces = new List <IApplyForce>()
                    {
                        new Gravity()
                    }
                };
                _renderer.AddEmitter(emitter);
            }
        }