void Update() { if (Input.GetKeyDown(KeyCode.L)) { Loan loan = LoanManager.NewLoan(); wealth += loan.Amount; } if (Input.GetKeyDown(KeyCode.K)) { LoanManager.GetLoan().Print(); } }
void OnNewMonthEvent(NewMonthEvent e) { foreach (Building b in buildings) { wealth += b.State == BuildingState.Owned ? b.TotalRent : 0; } Loan loan = LoanManager.GetLoan(); if (loan != null && !loan.Completed) { wealth -= loan.MonthlyPayment; } }
void AssignLoan(int id) { //pobieranie danych o pożyczce z bazy danych loan = LoanManager.GetLoan(id); //wyświetlenie ich w polach textowych cbEmployee.SelectedValue = loan.IdEmployee; tbName.Text = loan.Name; dtpData.Value = loan.Date.Date; tbAmount.Text = loan.Amount.ToString(); tbInstallmentLoan.Text = loan.InstallmentLoan.ToString(); tbOther.Text = loan.OtherInfo; }