示例#1
0
    void AddHexTile(GameObject tile, int i, int[] terrain)
    {
        TileManager tileManager = TileManager.Get();

        int tileType = terrain[i];

        switch (tileType)
        {
        case 0:
            WaterHexTile.SetTile(tile);
            break;

        case 1:
            ForestHexTile.SetTile(tile);
            tileManager.AddForestTile(tile);
            break;

        case 2:
            LandHexTile.SetTile(tile);
            tileManager.AddLandTile(tile);
            break;

        case 3:
            DesertHexTile.SetTile(tile);
            break;
        }

        /*
         * tile.GetComponent<HexTile>().AddBuilding(new NuclearA(),0);
         * tile.GetComponent<HexTile>().AddBuilding(new NuclearA(),1);
         * tile.GetComponent<HexTile>().AddBuilding(new NuclearA(),2);
         */
    }