Ejemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     moneyLibrary = LibraryManager.instance.get <MoneyLibrary>();
     lastUpdate   = Time.time;
     StartCoroutine(ScoreUpdater());
     score              = moneyLibrary.getMoney();
     displayScore       = score;
     scoreTextMesh.text = "$" + (displayScore / 100.0f).ToString("0.00"); //Write it to the UI
 }
Ejemplo n.º 2
0
    public void setIngredientItem(IIngredientInventoryItem item)
    {
        Start();

        selectedItem = item;
        display.setIngredient(item.ingredient);
        if (item is IngredientInventoryItemShop)
        {
            IngredientInventoryItemShop shopItem = (IngredientInventoryItemShop)item;
            costText.text = "$" + (shopItem.cost / 100.0).ToString("0.00");
            updateEnableBuyButton(moneyLibrary.getMoney());
            buyButton.gameObject.SetActive(true);
        }
        else
        {
            costText.text = "";
            buyButton.gameObject.SetActive(false);
        }
    }
Ejemplo n.º 3
0
 private void Start()
 {
     moneyLibrary = LibraryManager.instance.get <MoneyLibrary>();
     moneyLibrary.moneyChanged += setMoneyText;
     setMoneyText(moneyLibrary.getMoney());
 }