public MapLevelFactory(MapViewContext mapViewContext, MapTileUpdater mapTileUpdater, Object tileRefObject, GameObject parent)
 {
     this.tileRefObject  = tileRefObject;
     this.mapViewContext = mapViewContext;
     this.mapTileUpdater = mapTileUpdater;
     this.parent         = parent;
 }
Beispiel #2
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);
        }
Beispiel #3
0
 public MapTileFactory(Object tileRefObject, MapLevelContext mapLevelContext, MapTileUpdater mapTileUpdater)
 {
     this.tileRefObject   = tileRefObject;
     this.mapLevelContext = mapLevelContext;
     this.mapTileUpdater  = mapTileUpdater;
 }