using System; using System.Collections.Generic; using ET; using FairyGUI; using UI.Store; namespace GFGGame { public class ShopViewManager : SingletonBase { public void BuyItem(int itemId, int itemCount, int shopType, ShopCfg shopCfg) { BuyItemConteoller.Show(itemId, itemCount, ConstBuyType.TYPE_SHOP, shopType, () => { LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.FU_ZHUANG_DIAN, 2); GetSuitItemController.TryShow(0); }, true, false, GameConst.MAX_COUNT_TO_BUY_ITEMS); } public void UpdateVipProgressCom(GObject obj) { UI_ComVipLv com = UI_ComVipLv.Proxy(obj); com.m_txtLv.text = RoleDataManager.vipLv.ToString(); VipCfg vipCfg = VipCfgArray.Instance.GetCfg(RoleDataManager.vipLv); VipCfg nextVipCfg = VipCfgArray.Instance.GetCfg(RoleDataManager.vipLv + 1); com.m_txtTipsFull.visible = nextVipCfg == null; if (com.m_btnRule.data == null) { com.m_btnRule.onClick.Add(RuleController.ShowRuleView); com.m_btnRule.data = 300007; } if (nextVipCfg != null) { com.m_proExp.target.max = vipCfg.num; com.m_proExp.target.value = RoleDataManager.vipExp; com.m_proExp.m_txttitle.SetVar("value", com.m_proExp.target.value.ToString()).FlushVars(); com.m_proExp.m_txttitle.SetVar("max", com.m_proExp.target.max.ToString()).FlushVars(); com.m_txtTips.SetVar("exp", (vipCfg.num - RoleDataManager.vipExp).ToString()).FlushVars(); com.m_txtTips.SetVar("vipLv", (nextVipCfg.id).ToString()).FlushVars(); } UI_ComVipLv.ProxyEnd(); } } }