private void ClearPopup() { mItemToBuy = null; mDiamondsToBuy = null; MessageBox.gameObject.SetActive(false); DialogBox.gameObject.SetActive(false); }
public void BuyItem(string name, TypePanel type) { if (type == TypePanel.Shop) { mItemToBuy = ItemsShop.GetItem(name); } else if (type == TypePanel.Diamonds) { mDiamondsToBuy = ItemsShop.GetDiamonds(name); } DialogBox.SetTextAndShow(CONFIRMATION_MSG + name); }
public void ValidatedBuy() { bool ret = false; if (mItemToBuy != null) { ret = BuyItem(); } else if (mDiamondsToBuy != null) { ret = BuyDiamonds(); } if (!ret) { MessageBox.SetTextAndShow(ERROR_MSG); } mItemToBuy = null; mDiamondsToBuy = null; }
public DiamondsDesc GetDiamonds(string name) { DiamondsDesc ret = DiamondsDescList.Find(x => x.Name.Equals(name)); return(ret); }