Beispiel #1
0
    public void BuyItem()
    {
        NewItem item = features[currFeature].ReturnItem();
        string  key  = item.GetName();

        PlayerPrefs.SetInt(key, 1);
        int totalOrbs = PlayerPrefs.GetInt("ORBS");

        PlayerPrefs.SetInt("ORBS", totalOrbs - item.GetCost());
    }
Beispiel #2
0
    public void UpdateText()
    {
        Feature currFeature = mgr.features[mgr.currFeature];
        NewItem currItem    = currFeature.ReturnItem();

        itemName.text    = currItem.GetName();
        cost.text        = currItem.GetCost().ToString();
        description.text = currItem.GetDescription();

        playerFundsText.text = PlayerPrefs.GetInt("ORBS").ToString();
    }