Пример #1
0
 public void BuyFabric(int index)
 {
     if (!HasFabric(index))
     {
         Fabrics[index] = new SimpleFabric(this);
         if (Money >= Fabrics[index].BuildPrice)
         {
             Money          -= Fabrics[index].BuildPrice;
             _fab_fix_costs += GetFixCostFabric(index);
         }
         else
         {
             Fabrics[index].Remove();
         }
     }
 }
Пример #2
0
 public Director()
 {
     //start kit
     Bank           = null;
     Materials      = 4;
     Product        = 2;
     Money          = 10000;
     _bankrupt      = false;
     Fabrics        = new Fabric[6];
     _fab_fix_costs = 0;
     for (int i = 0; i < 2; i++)
     {
         Fabrics[i] = new SimpleFabric(this, 0);
     }
     UpdateFabCosts();
 }