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); }
public MapLevelSpowner(MapLevelFactory mapLevelFactory) { this.mapLevelFactory = mapLevelFactory; }