Beispiel #1
0
 public void CreateBuilding(Vector3 pos)
 {
     if (CanBuildAtPos(pos))
     {
         Building referenceBuilding = GetSelectedBuilding();
         Building buildingCopy      = Instantiate(referenceBuilding, transform);
         buildingCopy.transform.position = new Vector3(pos.x, yOffset, pos.z);
         _buildings.Add(pos, buildingCopy);
         _economyManager.SpendGold(referenceBuilding.cost);
     }
 }