public void OpenPlayerEquipViewById(uint uid, string leftText, string rightText, UIWidgetContainer.ClickDelegate mLeftOnClick = null, UIWidgetContainer.ClickDelegate mRightOnClick = null, UIWidgetContainer.ClickDelegate closeOnClick = null, UIWidgetContainer.ClickDelegate openHandle = null) { this.goodsId = GoodsMode.Instance.GetOtherPGoods(uid).goodsId; this.mCloseOnClick = closeOnClick; OpenView(); }
/// <summary> /// 不在背包的物品,如商店等 /// </summary> /// <param name="goodsId"></param> /// <param name="leftClick">按钮响应函数,如果为null 则隐藏</param> /// <param name="rightClick">按钮响应函数,如果为null 则隐藏</param> /// <param name="leftText">按钮文本</param> /// <param name="rightText">按钮文本</param> /// <param name="tipsType">Tips的具体样式</param> public void OpenTipsByGoodsId(uint goodsId, UIWidgetContainer.ClickDelegate leftClick, UIWidgetContainer.ClickDelegate rightClick, string leftText, string rightText, TipsType tipsType = TipsType.DEFAULT_TYPE) { if (goodsId > GoodsMode.Instance.GoodsId) { Singleton <GoodsTips> .Instance.OpenViewByGoodsId(goodsId, leftText, rightText, leftClick, rightClick, tipsType); } else { SysEquipVo vo = BaseDataMgr.instance.GetDataById <SysEquipVo>(goodsId); if (vo == null) { Log.info(this, "没有找到Vo"); return; } else if (vo.type == GoodsConst.PET_EQUIP) { Singleton <PetEquipTips> .Instance.OpenViewByGoodsId(goodsId, leftText, rightText, leftClick, rightClick); } else if (vo.type == GoodsConst.ROLE_EQUIP) { Singleton <EquipTips> .Instance.OpenViewByGoodsId(goodsId, leftText, rightText, leftClick, rightClick, null, tipsType); } } }
public void OpenPlayerEquipViewByPGoods(PGoods other, string leftText, string rightText, UIWidgetContainer.ClickDelegate mLeftOnClick = null, UIWidgetContainer.ClickDelegate mRightOnClick = null, UIWidgetContainer.ClickDelegate closeOnClick = null, TipsType tipsType = TipsType.DEFAULT_TYPE) { showOtherPlayerEquip = true; this.id = other.id; goods = other; this.mLeftOnClick = mLeftOnClick; this.mRightOnClick = mRightOnClick; this.mCloseOnClick = closeOnClick; this.leftBtnLabel = leftText; this.rightBtnLabel = rightText; this.tipsType = tipsType; OpenView(); }
public void OpenViewById(uint id, string leftText, string rightText, UIWidgetContainer.ClickDelegate mLeftOnClick = null, UIWidgetContainer.ClickDelegate mRightOnClick = null, UIWidgetContainer.ClickDelegate closeOnClick = null, TipsType tipsType = TipsType.DEFAULT_TYPE) { this.id = id; goods = Singleton <GoodsMode> .Instance.GetPGoodsById(id); this.mLeftOnClick = mLeftOnClick; this.mRightOnClick = mRightOnClick; this.mCloseOnClick = closeOnClick; this.leftBtnLabel = leftText; this.rightBtnLabel = rightText; this.tipsType = tipsType; OpenView(); }
public void OpenViewByGoodsId(uint goodsId, string leftText, string rightText, UIWidgetContainer.ClickDelegate mLeftOnClick = null, UIWidgetContainer.ClickDelegate mRightOnClick = null, UIWidgetContainer.ClickDelegate closeOnClick = null, TipsType tipsType = TipsType.DEFAULT_TYPE) { this.id = goodsId; goods = new PGoods(); goods.goodsId = goodsId; this.mLeftOnClick = mLeftOnClick; this.mRightOnClick = mRightOnClick; this.mCloseOnClick = closeOnClick; this.leftBtnLabel = leftText; this.rightBtnLabel = rightText; this.tipsType = tipsType; OpenView(); }
public void OpenViewByGoodsId(uint goodsId, string leftText, string rightText, UIWidgetContainer.ClickDelegate mLeftclickDelegate, UIWidgetContainer.ClickDelegate mRightclickDelegate, TipsType tipsType) { this.id = id; goods = new PGoods(); goods.goodsId = goodsId; this.tipsType = tipsType; this.mLeftclickDelegate = mLeftclickDelegate; //this.mMiddleclickDelegate = mMiddleclickDelegate; this.mRightclickDelegate = mRightclickDelegate; this.leftBtnLabel = leftText; this.rightBtnLabel = rightText; OpenView(); }
//单击右边背包物品,显示 Tips 界面 private void ShowRightTips(GameObject go) { ItemContainer ic = go.GetComponent <ItemContainer>(); if (ic.Id != 0) { UIWidgetContainer.ClickDelegate leftDelegate = null, rightDelegate = null; string leftText = null, rightText = null; currentGoods = GoodsMode.Instance.GetPGoodsById(ic.Id); if (currentGoods.goodsId > GoodsMode.Instance.GoodsId) { SysItemVo vo = BaseDataMgr.instance.GetDataById <SysItemVo>(currentGoods.goodsId); if (vo.can_use == true) //可使用 { leftText = LanguageManager.GetWord("Goods.QuickUse"); rightText = LanguageManager.GetWord("Goods.Use"); leftDelegate = QuickUseOnClick; rightDelegate = UseGoodsOnClick; } else { } } else //装备 { repos = 1; SysEquipVo equip = BaseDataMgr.instance.GetDataById <SysEquipVo>(currentGoods.goodsId); if (equip.type == GoodsConst.ROLE_EQUIP) { leftText = LanguageManager.GetWord("Goods.Forge"); rightText = LanguageManager.GetWord("Goods.PutOn"); leftDelegate = ForgeEquipment1; rightDelegate = WearEquipment; } else if (equip.type == GoodsConst.PET_EQUIP) { } } vp_Timer.In(0.26f, delegate() { Singleton <TipsManager> .Instance.OpenTipsById(currentGoods.id, leftDelegate, rightDelegate, leftText, rightText, TipsType.DEFAULT_TYPE); }, 1, rightClickHandle); } }
public void OpenViewById(uint id, string leftText, string rightText, UIWidgetContainer.ClickDelegate mLeftclickDelegate, UIWidgetContainer.ClickDelegate mRightclickDelegate, TipsType tipsType) { this.id = id; goods = Singleton <GoodsMode> .Instance.GetPGoodsById(id); this.tipsType = tipsType; this.mLeftclickDelegate = mLeftclickDelegate; //this.mMiddleclickDelegate = mMiddleclickDelegate; this.mRightclickDelegate = mRightclickDelegate; this.leftBtnLabel = leftText; this.rightBtnLabel = rightText; OpenView(); //miaoShuList[1].text = vo. //jiBenSX.text = vo. }
public void OpenPlayerEquipTipsById(uint id, UIWidgetContainer.ClickDelegate leftClick, UIWidgetContainer.ClickDelegate rightClick, UIWidgetContainer.ClickDelegate closeClick, string leftText, string rightText, TipsType tipsType = TipsType.DEFAULT_TYPE) { PGoods goods = Singleton <GoodsMode> .Instance.GetOtherPGoods(id); SysEquipVo vo = BaseDataMgr.instance.GetDataById <SysEquipVo>(goods.goodsId); if (vo == null) { Log.info(this, "没有找到Vo"); return; } else if (vo.type == GoodsConst.PET_EQUIP) { Singleton <PetEquipTips> .Instance.OpenPlayerEquipViewById(id, leftText, rightText, leftClick, rightClick, closeClick); } else if (vo.type == GoodsConst.ROLE_EQUIP) { Singleton <EquipTips> .Instance.OpenPlayerEquipViewById(id, leftText, rightText, leftClick, rightClick, closeClick, tipsType); } }
public void OpenViewByGoodsId(uint goodsId, string leftText, string rightText, UIWidgetContainer.ClickDelegate mLeftOnClick = null, UIWidgetContainer.ClickDelegate mRightOnClick = null, UIWidgetContainer.ClickDelegate closeOnClick = null, UIWidgetContainer.ClickDelegate openHandle = null) { this.goodsId = goodsId; OpenView(); }