// 批量购买当前选中物品 public void BuyBatchCurItem() { CloseCurItemTip(); if (null != m_curShowPage) { SysShopPage curPage = m_curShowPage.GetComponent <SysShopPage>(); if (curPage == null || curPage.GetCurHighLightItem() == null) { return; } Tab_SystemShop sysShopTable = TableManager.GetSystemShopByID(m_curShopID, 0); if (sysShopTable != null && sysShopTable.CanBuyMulty > 0) { string medicalName = curPage.GetCurHighLightItem().LabelName.text; string goldMoneyShopTitle = StrDictionary.GetClientDictionaryString("#{10955}", medicalName); string goldMoneyShopTotalTitle = StrDictionary.GetClientDictionaryString("#{2837}"); string oktitle = StrDictionary.GetClientDictionaryString("#{2837}"); int index = int.Parse(curPage.GetCurHighLightItem().gameObject.name); string currencyIcon = string.Empty; int moneyType = sysShopTable.GetMoneyTypebyIndex(index); int moneySubType = sysShopTable.GetMoneySubTypebyIndex(index); int stepPerClick = 1; if (moneyType == (int)Consume_Type.COIN) { currencyIcon = "qian5"; stepPerClick = 10; } else if (moneyType == (int)Consume_Type.YUANBAO) { if (moneySubType == (int)Consume_SubType.YUANBAO_NORMAL) { currencyIcon = "qian2"; } else if (moneySubType == (int)Consume_SubType.YUANBAO_BIND) { currencyIcon = "qian3"; } } NumChooseController.OpenWindow(ITEMCOUNT_MIN, ITEMCOUNT_MAX, goldMoneyShopTitle, OnNumChoose, stepPerClick, goldMoneyShopTotalTitle, oktitle, true, "", currencyIcon, sysShopTable.GetPricebyIndex(index)); } else { MessageBoxLogic.OpenOKBox(1004, 1000); } } }
// 获取当前选中ITEM SysShopPageItem GetSelectedItem() { if (null == m_curShowPage) { return(null); } SysShopPage curPage = m_curShowPage.GetComponent <SysShopPage>(); if (null == curPage) { return(null); } return(curPage.GetCurHighLightItem()); }
// 购买当前选中物品 public void BuyCurItem() { CloseCurItemTip(); if (null != m_curShowPage) { SysShopPage curPage = m_curShowPage.GetComponent <SysShopPage>(); if (curPage == null) { return; } SysShopPageItem curItem = curPage.GetCurHighLightItem(); if (curItem == null) { return; } BuyItem(curItem.gameObject.name, 1); } }