Esempio n. 1
0
        public void FireEnded(DemoMinifier.Models.Vector position)
        {
            if (molotovs.Count == 0)
            {
                return;
            }

            FireCircle circle = molotovs.Dequeue();

            canvas.Children.Remove(circle);
        }
Esempio n. 2
0
        public void FireStarted(DemoMinifier.Models.Vector position)
        {
            FireCircle circle = new FireCircle();

            canvas.Children.Add(circle);
            molotovs.Enqueue(circle);

            Point  radarPosition = MapPoint(position);
            double radius        = (MapPoint(position) - MapPoint(position + new DemoMinifier.Models.Vector(288, 0, 0))).Length;

            circle.SetRadius(radius);
            double left = radarPosition.X - radius / 2d;
            double top  = radarPosition.Y - radius / 2d;

            Canvas.SetLeft(circle, left);
            Canvas.SetTop(circle, top);
        }