Ejemplo n.º 1
0
        public void AddTarget(int x, int y, System.Windows.Media.Color? color, string colorName)
        {
            if (color == null)
            {
                color = System.Windows.Media.Color.FromArgb(255, 255, 0, 0);
                colorName = "Red";
            }
            var newTarget = new TargetProvider(x, y) {TargetColor = color.Value, ColorName = colorName};
            Targets.Add(newTarget);

            _timer.Tick += newTarget.Move;
        }
Ejemplo n.º 2
0
        public void RemoveTarget(TargetProvider target)
        {
            _timer.Tick -= target.Move;

            Targets.Remove(target);
        }