Пример #1
0
 public void ConfirmBuyButton()
 {
     if (readData.dataUserModel.money < CalculatePrice(moneyStore.itemType[currentItemPick], moneyStore.itemId[currentItemPick]))
     {
         OpenAlertMessage(readData.jsonWordingData["notEnoughMoney"][readData.languageId].ToString(), null);
     }
     else if (moneyStore.itemType[currentItemPick] == 2 && readData.dataUserModel.warrior.Count >= readData.dataUserModel.bag_warrior)
     {
         SetWordingUpgradePopup();
         OpenPopupUpgradeBag();
     }
     else if (moneyStore.itemType[currentItemPick] == 3 && readData.dataUserModel.equipment.Count >= readData.dataUserModel.bag_equipment)
     {
         SetWordingUpgradePopup();
         OpenPopupUpgradeBag();
     }
     else if (moneyStore.itemType[currentItemPick] == 4 && readData.dataUserModel.gem.Count >= readData.dataUserModel.bag_gem)
     {
         SetWordingUpgradePopup();
         OpenPopupUpgradeBag();
     }
     else
     {
         StartCoroutine(readData.BuyItemFromMoneyStore());
     }
 }