public void BuyItem(V_GachaponItem item) { // #revision: add other types of items if (playerModel.charge < 20) { UIController.AskYesNoQ("Do you wanna charge?", () => { /* go buy something */ }, UIController.CloseYesNoQ); } try { V_Weapon tmpWeapon = item.itemPrfb.GetComponent <V_Weapon>(); if (tmpWeapon != null) { // #revision: name should be on the item itself UIController.ThrowError("you bought " + item.itemPrfb.name, UIController.CloseError); } } catch (System.Exception err) { throw err; } }
public void RevealItem(V_GachaponItem item) { boxDetailPanel.GetComponent <Image>().sprite = item.sprite; boxDetailPanel.SetActive(true); }