public void SetDefault() { ResursesList = Generator.ResursesList; Buildings.Add(new Buildings(Generator.Buildings["timber"])); Buildings.Add(new Buildings(Generator.Buildings["stonemason"])); Buildings.Add(new Buildings(Generator.Buildings["smallhouse"])); AktivatBuildings(); }
public Buildings(Buildings ConstructionOrder) { Name = ConstructionOrder.Name; Funktion = ConstructionOrder.Funktion; Resurs = ConstructionOrder.Resurs; Value = ConstructionOrder.Value; Cost = new Cost(ConstructionOrder.Cost); Worker = ConstructionOrder.Worker; }
private void ConstructionOrder(string Build) { if (Build.Length > 0) { if (Generator.Buildings[Build].Cost.CostStone <= ResursesList["stone"].Colected && Generator.Buildings[Build].Cost.CostWood <= ResursesList["wood"].Colected && Generator.Buildings[Build].Worker <= ResursesList["vilager"].FreeWorkers) { Buildings.Add(new Buildings(Generator.Buildings[Build])); ResursesList["wood"].Colected -= Generator.Buildings[Build].Cost.CostWood; ResursesList["stone"].Colected -= -Generator.Buildings[Build].Cost.CostStone; } else { Console.WriteLine("nicht genug Resursen"); } } }
public abstract void Work(Settelment Settelment, Buildings Buildings);