public void TakeResponse(CashBox.ResponseCode Code) { switch (Code) { case CashBox.ResponseCode.Good: State = 2; GotMoney = true; break; case CashBox.ResponseCode.TryToAbs: Tries--; if (Tries == 2) { Desire /= 100; Desire *= 100; } else if (Tries == 1) { Desire /= 1000; Desire *= 1000; } State = 4; break; case CashBox.ResponseCode.NotEnoughMoney: Tries--; if (Tries != 0) { Desire = MainUnitProcessor.GetRandomMoneyCount(Desire); State = 4; } else State = 3; break; } }
public static void PlaceCashBox() { MainMachine = new CashBox(); DrawingClass.DrawCashBox(); }