Exemplo n.º 1
0
        public IEnumerator LoadTileData(GOMap m, Coordinates tilecenter, int zoom, GOLayer[] layers, bool delayedLoad)
        {
            map = m;

            tileCoordinates = tileCenter.tileCoordinates(map.zoomLevel);

            if (Application.isPlaying)
            {
                yield return(StartCoroutine(DownloadData(m, tileCenter, zoom, layers, delayedLoad)));

                List <string> layerNames = map.layerNames();
                yield return(StartCoroutine(ParseTileData(map, tileCenter, zoom, layers, delayedLoad, layerNames)));
            }
            else
            {
                GORoutine.start(DownloadData(m, tileCenter, zoom, layers, delayedLoad), this);
            }
        }
Exemplo n.º 2
0
        public void Update()
        {
            if (Application.isPlaying || TileLoaded || !map)
            {
                return;
            }

            if (mapData != null)
            {
                TileLoaded = true;
                GORoutine.start(ParseTileData(map, tileCenter, map.locationManager.zoomLevel, map.layers, false, map.layerNames()), this);
            }
        }