public void TimerPaint(MapTimerPaintEventArgs e)
        {
            if (_fullControllManipulator != null && !_manipulators.Contains(_fullControllManipulator))
            {
                _fullControllManipulator.TimerPaint(e);
            }

            foreach (ManipulatorBase manipulator in _manipulators)
            {
                manipulator.TimerPaint(e);
            }
        }
Exemple #2
0
        public override void TimerPaint(MapTimerPaintEventArgs e)
        {
            // Toggle marker of selected village
            _activeVillagePaintsCounter++;
            if (_mainMapSelectedVillage != null && _activeVillagePaintsCounter % 50 == 0)
            {
                _activeVillageAnimationPen = ReferenceEquals(_activeVillageAnimationPen, _activeVillagePen2) ? _activeVillagePen : _activeVillagePen2;
                Point             villageLocation = _map.Display.GetMapLocation(_mainMapSelectedVillage.Location);
                VillageDimensions village         = _map.Display.Dimensions;

                PaintCross(e.Graphics, _activeVillageAnimationPen, villageLocation, village.SizeWithSpacing);
            }
        }
        public override void TimerPaint(MapTimerPaintEventArgs e)
        {
            if (e.IsActiveManipulator)
            {
                e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
                Village village = _pinPointedVillage ?? _selectedVillage;
                if (village != null)
                {
                    var villageSize = _map.Display.Dimensions.SizeWithSpacing;

                    Point mapLocation = _map.Display.GetMapLocation(village.Location);

                    const int xOff = 5;
                    const int yOff = 10;

                    _pinpointedAnimationCounter += 5;
                    if (_pinpointedAnimationCounter > 360)
                    {
                        _pinpointedAnimationCounter = 0;
                    }

                    e.Graphics.DrawEllipse(
                        _lockPinpointedVillage ? _pinpointedAnimationPen : _pinpointedPen,
                        mapLocation.X - xOff,
                        mapLocation.Y - xOff,
                        villageSize.Width + yOff,
                        villageSize.Height + yOff);

                    e.Graphics.DrawArc(
                        _lockPinpointedVillage ? _pinpointedPen : _pinpointedAnimationPen,
                        mapLocation.X - xOff,
                        mapLocation.Y - xOff,
                        villageSize.Width + yOff,
                        villageSize.Height + yOff,
                        _pinpointedAnimationCounter,
                        30);
                }
            }
        }
Exemple #4
0
 public virtual void TimerPaint(MapTimerPaintEventArgs e)
 {
 }