Example #1
0
 public void Settle()
 {
     if (selectedUnit != null && selectedUnit.type == Unit.UnitTypes.Settler)
     {
         TileCell   cell = selectedUnit.cell;
         GameObject go   = Instantiate(cityCenterPrefab);
         go.transform.position = new Vector3(cell.x, 0, cell.y);
         grid.DiscoverArea(cell, 3, false);
         DeleteUnit(selectedUnit);
         city.ActivateCity();
         GameObject.Find("Canvas").transform.Find("Settler").gameObject.SetActive(false);
         city.cell = cell;
         city.PlaceZone(cell, Zones.Civic);
     }
 }