Exemple #1
0
 private void DrawCurrentTrack(Point point)
 {
     _currentTrackPoint?.Clear();
     _currentTrackPoint = new PointData(CanvasRef)
     {
         Point = point, PointVisual = DrawPointObject(point, Brushes.Yellow, DotType.CurrentTrack)
     };
 }
Exemple #2
0
        private void DrawRandom(Point point)
        {
            _randomPoint?.Clear();
            _randomPoint = new PointData(CanvasRef)
            {
                Point       = point,
                PointVisual = DrawPointObject(point, Brushes.LawnGreen, DotType.Random)
            };

            OnPointAdded?.Invoke(this, new PointArgs(point, DotType.Random));
        }
Exemple #3
0
        /// <summary>
        /// Clear game field.
        /// </summary>
        public void Clear()
        {
            foreach (var point in _anchorPoints)
            {
                point.Clear();
            }

            _currentTrackPoint.Clear();
            _randomPoint.Clear();
            foreach (var point in _trackPoints)
            {
                point.Clear();
            }

            _trackPoints.Clear();
            _anchorPoints.Clear();
            _currentTrackPoint = _randomPoint = null;
        }