コード例 #1
0
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.L))
     {
         Loan loan = LoanManager.NewLoan();
         wealth += loan.Amount;
     }
     if (Input.GetKeyDown(KeyCode.K))
     {
         LoanManager.GetLoan().Print();
     }
 }
コード例 #2
0
    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;
        }
    }
コード例 #3
0
        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;
        }