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(); } } }
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(); }