Пример #1
0
    public void GenerateWorld()
    {
        GameObject worldObj = new GameObject();

        worldObj.name = "WorldMap";

        //List<GameObject> tiles = new List<GameObject>();
        tiles = new GameObject[Map.size.x, Map.size.y];

        for (int a = 0; a < Map.size.x; a++)
        {
            GameObject row = new GameObject();
            row.transform.parent = worldObj.transform;
            row.name             = "Row_" + a;

            for (int b = 0; b < Map.size.y; b++)
            {
                GameObject tile = GenerateTile(a, b, row);
                tiles[a, b] = tile;
            }
        }

        meshCombiner.CreateTilemapMesh(tiles);

        //actionSelecter.LoadActionButtons();
        actionSelecter.LoadActionEnablers();

        ProductivityController.LoadProductivityLists();
        ProductivityController.LoadCompetitors(diplomacy.cities);
        ProductivityController.UpdateProductivities();

        immigration.LoadImmigrantData();

        WalkerGrid = Map.size.CreateArrayOfSize <List <Walker> > ();
    }
Пример #2
0
    public void GenerateWorld()
    {
        GameObject worldObj = new GameObject();

        worldObj.name = "WorldMap";

        //for (int a = 0; a < Map.size.X; a++) {

        //    GameObject row = new GameObject();
        //    row.transform.parent = worldObj.transform;
        //    row.name = "Row_" + a;

        //    for (int b = 0; b < Map.size.Y; b++) {

        //        GenerateTile(a, b);

        //    }

        //}

        tilemap.BuildMesh(Map);

        actionSelecter.LoadActionButtons();
        actionSelecter.LoadActionEnablers();
    }