Exemple #1
0
        /// <summary>
        /// Perform calculations and update data.
        /// </summary>
        /// <param name="updateTime">Time since last update.</param>
        /// <remarks>include base.Update(renderTime); in overloads to preserve updating UpdateTime field.</remarks>
        public override void Update(RenderTime updateTime)
        {
            base.Update(updateTime);

            bool zoomChanged    = zoomLevel != Surface.Coordinates.ZoomLevel;
            bool baseMapChanged = _baseMapTile != MM_Repository.OverallDisplay.MapTiles;

            zoomLevel    = Surface.Coordinates.ZoomLevel;
            _baseMapTile = MM_Repository.OverallDisplay.MapTiles;


            if (baseMapChanged || zoomChanged)
            {
                CleanupTiles();
            }

            if (baseMapChanged)
            {
                Surface.AddOnscreenMessage("Base map layer changed: " + _baseMapTile.ToString(), _baseMapTile == MM_MapTile.enumMapType.None ? SharpDX.Color.Red : SharpDX.Color.Aqua);
            }
            //ProcessLoadingQueue();
        }
Exemple #2
0
 /// <summary>
 /// Report an easy to read string for our object
 /// </summary>
 /// <returns></returns>
 public override string ToString()
 {
     return(MapType.ToString() + "," + ZoomLevel.ToString() + "," + TileXY.X + "," + TileXY.Y);
 }