Esempio n. 1
0
    void Purchase(Item bought)
    {
        GameObject  thePlayer = GameObject.Find("CashHandlerObject");
        CashHandler CH        = thePlayer.GetComponent <CashHandler> ();

        CH.totalCash -= bought.cost;
        bought.count++;
        bought.cost = bought.cost * 2.1f;
        UpdateItems();
        cHandler.CashSecond();
        //START Change the Picture - Working
        counter = 0;
        foreach (Item i in ShopItems)
        {
            ItemScript scp = buttonItems[counter].GetComponent <ItemScript> ();
            scp.count.text = i.count.ToString();
            if (i.count == 1)
            {
                scp.icon.sprite = one;
            }
            if (i.count == 2)
            {
                scp.icon.sprite = two;
            }
            if (i.count == 3)
            {
                scp.icon.sprite = three;
            }
            if (i.count == 4)
            {
                scp.icon.sprite = four;
            }
            if (i.count == 5)
            {
                scp.icon.sprite = five;
            }
            counter++;
        }
        //END Change the Picture - Working
    }
 public PayrollProcessor()
 {
     _bankTransferProcessor = new BankTransferProcessor();
     _cashHandler           = new CashHandler();
     _accountingManager     = new AccountingManager();
 }
Esempio n. 3
0
 public ChargeViewModel()
 {
     Cashes     = new CashHandler().GetAll();
     Currencies = new CurrencyHandler().GetAllActive();
 }
Esempio n. 4
0
 public SellViewModel(User User)
 {
     Cashes     = new CashHandler().GetUserCashes(User.ID);
     Currencies = new CurrencyHandler().GetAllActive();
 }