逍遥游云游宝玉修改提交
parent
68af385814
commit
9e7cd31376
|
@ -16,6 +16,7 @@ function this:InitComponent(gameObject)
|
|||
this.bodyText = Util.GetGameObject(gameObject, "BodyText"):GetComponent("Text")
|
||||
this.cancelBtn = Util.GetGameObject(gameObject, "CancelBtn")
|
||||
this.confirmBtn = Util.GetGameObject(gameObject, "ConfirmBtn")
|
||||
Util.GetGameObject(this.confirmBtn,"Text"):GetComponent("Text").text = "使用"
|
||||
this.tipText = Util.GetGameObject(gameObject, "tipText"):GetComponent("Text")
|
||||
this.addBtn = Util.GetGameObject(gameObject, "addBtn")
|
||||
this.root = Util.GetGameObject(gameObject, "Root/Content")
|
||||
|
@ -33,23 +34,28 @@ function this:BindEvent()
|
|||
Timer.New(function()
|
||||
LogGreen("BagManager.GetItemCountById(UpViewRechargeType.YunYouVle)--------------:"..BagManager.GetItemCountById(UpViewRechargeType.YunYouVle))
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.XiaoYao.RefreshEventShow)
|
||||
parent:ClosePanel()
|
||||
this:OnShow(parent,98)
|
||||
end,1):Start()
|
||||
end)
|
||||
end,0)
|
||||
else
|
||||
PopupTipPanel.ShowTip("云游宝玉不足")
|
||||
end
|
||||
end)
|
||||
Util.AddClick(this.addBtn,function()
|
||||
Util.AddClick(this.addBtn,function()
|
||||
UIManager.OpenPanel(UIName.ShopBuyPopup, 7,10032)
|
||||
parent:ClosePanel()
|
||||
end)
|
||||
end
|
||||
|
||||
function this:AddListener()
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Bag.BagGold, this.RefreshPanel)--监听背包信息改变刷新 用于回春散数量刷新
|
||||
end
|
||||
|
||||
function this:RemoveListener()
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.Bag.BagGold, this.RefreshPanel)
|
||||
end
|
||||
|
||||
function this.RefreshPanel()
|
||||
this:OnShow(parent,98)
|
||||
end
|
||||
|
||||
function this:OnShow(_parent,...)
|
||||
|
|
|
@ -117,8 +117,10 @@ function this.UpdateShopData(msg)
|
|||
|
||||
end
|
||||
|
||||
--- 请求购买物品
|
||||
function this.RequestBuyShopItem(shopType, shopItemId, num, func)
|
||||
|
||||
|
||||
--- 请求购买物品 isShowReward 没有弹恭喜获得 ,有 == 0 不弹
|
||||
function this.RequestBuyShopItem(shopType, shopItemId, num, func,isShowReward)
|
||||
if not shopType or not shopItemId or not num then
|
||||
return
|
||||
end
|
||||
|
@ -170,7 +172,10 @@ function this.RequestBuyShopItem(shopType, shopItemId, num, func)
|
|||
msg.drop.soulEquip and #msg.drop.soulEquip > 0-- or
|
||||
-- msg.drop.especialEquipId and #msg.drop.especialEquipId > 0
|
||||
then
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, msg.drop, 1)
|
||||
if isShowReward and isShowReward == 0 then
|
||||
else
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, msg.drop, 1)
|
||||
end
|
||||
end
|
||||
-- 购买次数增加
|
||||
local shopData = this.GetShopDataByType(shopType)
|
||||
|
|
Loading…
Reference in New Issue