コード例 #1
0
 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();
 }
コード例 #2
0
 public Buildings(Buildings ConstructionOrder)
 {
     Name     = ConstructionOrder.Name;
     Funktion = ConstructionOrder.Funktion;
     Resurs   = ConstructionOrder.Resurs;
     Value    = ConstructionOrder.Value;
     Cost     = new Cost(ConstructionOrder.Cost);
     Worker   = ConstructionOrder.Worker;
 }
コード例 #3
0
 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");
         }
     }
 }
コード例 #4
0
 public abstract void Work(Settelment Settelment, Buildings Buildings);