Ejemplo n.º 1
0
    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }

        CreditAccount     = new CreditAccountState(0, DateTime.Now.ToString(), new Credit(0, 0));
        transactions      = new List <Transaction>();
        WeeklyCreditState = new List <CreditAccountState>();
    }
Ejemplo n.º 2
0
    public void SetAccountData()
    {
        PlayerAccountData        accountData     = RoomManager.GetInstance().avatarData.accountData;
        CreditAccountData        creditData      = accountData.currentCreditAccountData;
        List <Transaction>       allTransactions = accountData.allTransactions;
        List <CreditAccountData> historial       = new List <CreditAccountData>();

        for (int i = 0; i < accountData.weeklyHistorial.Count; i++)
        {
            historial.Add(accountData.weeklyHistorial[i]);
        }
        Gold          = accountData.Gold;
        CreditAccount = new CreditAccountState(creditData.Balance, creditData.CutDate, new Credit(accountData.InterestRate, accountData.CreditLimit));
        transactions  = allTransactions;
        for (int i = 0; i < historial.Count; i++)
        {
            WeeklyCreditState.Add(new CreditAccountState(historial[i].Balance, historial[i].CutDate,
                                                         new Credit(historial[i].interestRate, historial[i].creditLimit)));
        } // end for
    }
 private CreditAccountAggregateRoot()
 {
     State = new CreditAccountState();
 }
Ejemplo n.º 4
0
 public void SetCreditAccount(int balance, string cutDate, Credit credit)
 {
     CreditAccount = new CreditAccountState(balance, cutDate, credit);
 }