public void NewMap() { entities.ClearEntities(); triGrid.CreateMap(x, z); mapGenerator.GenerateMap(x, z); isleland.topCam.ValidatePosition(); Selector.Instance.RequestLocation(null, SizeType.HEX, new BuildCommand(null)); }
public IEnumerator <Coroutine> NewMapInternal() { Time.timeScale = 0; Loaded = false; entities.ClearEntities(); yield return(StartCoroutine(grid.CreateMap(sizeX, sizeZ))); yield return(StartCoroutine(mapGenerator.GenerateMap(sizeX, sizeZ))); Loaded = true; topCam.ValidatePosition(); Selector.Instance.RequestLocation(null, new BuildCommand(null)); Time.timeScale = 1f; IslandView.SetActive(false); }
public void GenerateMap(int x, int z) { Selector.Instance.CancelCommand(); cellCount = x * z; grid.CreateMap(x, z); if (searchFrontier == null) { searchFrontier = new Queue <TriCell>(); checker = new HashSet <TriCoordinates>(); } xMin = mapBorderX; xMax = x - mapBorderX; zMin = mapBorderZ; zMax = z - mapBorderZ; CreateLand(); CreateClimate(); CreateRivers(); SetTerrainType(); }