Ejemplo n.º 1
0
    public void Purchase()
    {
        PlayerStatus.GoldCount -= purchasePrice;
        goldCount.text          = "Gold: " + PlayerStatus.GoldCount;

        for (int i = 0; i < quantityBuying; i++)
        {
            GameItem newItem = purchasedItem.CreateInstance();
            PlayerStatus.Inventory.AddItem(newItem);
        }

        thisPanel.SetActive(false);
        returnPanel.SetActive(true);
    }