private void CreateTile(int x, int y) { GameObject tileTemplate = null; int id = GameManager.Instance.Map.GetNodeID(x, y); PMNode node = GameManager.Instance.Map[id]; TileExtractor te = _tileTypes[(int)node.CType]; DestroyTile(id); if (te == null) { tileTemplate = null; } else if (te as TEDouble16 != null) { tileTemplate = GetTile(x, y, te as TEDouble16); } else if (te as TESingle != null) { tileTemplate = GetTile(x, y, te as TESingle); } if (tileTemplate != null) { _mapCellVis[id] = Instantiate(tileTemplate, new Vector3(x, y, 0), Quaternion.identity) as GameObject; _mapCellVis[id].name = "Tile_x " + x + "_y " + y; _mapCellVis[id].transform.SetParent(this.transform); } }
public static void ExportAll() { log.Info("Extracting Terrain and World Objects - This will take a long time....."); var startTime = DateTime.Now; TileExtractor.Prepare(); WorldObjectExtractor.Prepare(); ProcessAll(); log.Info("Done (Elapsed time: {0})", DateTime.Now - startTime); }