Example #1
0
 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));
 }
Example #2
0
    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);
    }
Example #3
0
 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();
 }