Exemple #1
0
        private void Start()
        {
            var tileLoadingService = new TileLoadingService(this, mapServiceWaitTime);
            var mapViewContext     = new MapViewContext(cut, tileResolution, tileLoadingService);

            var mapTileUpdater = new MapTileUpdater(mapViewContext);

            var converter     = new MapPixelConverter();
            var pixelLocation = new PixelLocation()
            {
                X = converter.LonToX(longitude), Z = converter.LatToZ(latitude)
            };

            var mapLevelFactory = new MapLevelFactory(mapViewContext, mapTileUpdater, tileRefObject, gameObject);

            mapLevelSpowner = new MapLevelSpowner(mapLevelFactory);
            mapLevelSpowner.SpownMapLevel(pixelLocation, zoomLevel);



            collider = GetComponent <Collider>();
            InputMaster.Instance.AddPointDragEventHandler(collider, OnPointerDrag);
            InputMaster.Instance.AddWheelScrollEventHandler(collider, OnScrollWheel);
        }
Exemple #2
0
 public MapLevelSpowner(MapLevelFactory mapLevelFactory)
 {
     this.mapLevelFactory = mapLevelFactory;
 }