添加云游值消耗
parent
a7abe7aee5
commit
a90bb04673
File diff suppressed because it is too large
Load Diff
|
|
@ -1830,6 +1830,7 @@ GENERAL_POPUP_TYPE={
|
|||
XuanYuanBuyTimes=21,--轩辕宝镜购买次数确认
|
||||
QinglongSerectTreasureBuyLevel = 22,--青龙秘宝购买等级
|
||||
HeavenUnlockExtraRewardPanel = 23, --青龙秘宝解锁
|
||||
XiaoYaoYouItemExchange = 24, --逍遥游道具兑换
|
||||
}
|
||||
|
||||
--抽卡类型
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ local contentScripts = {
|
|||
[21] = {view = require("Modules/Popup/View/GeneralPopup_BuyXuanYuanMirrorTims"), panelName = "GeneralPopup_BuyXuanYuanMirrorTims",type=GENERAL_POPUP_TYPE.XuanYuanBuyTimes},
|
||||
[22] = {view = require("Modules/Popup/View/GeneralPopup_QinglongSerectTreasureBuyLevel"), panelName = "GeneralPopup_QinglongSerectTreasureBuyLevel",type=GENERAL_POPUP_TYPE.QinglongSerectTreasureBuyLevel},
|
||||
[23] = {view = require("Modules/Popup/View/GeneralPopup_HeavenUnlockExtraRewardPanel"), panelName = "GeneralPopup_HeavenUnlockExtraRewardPanel",type=GENERAL_POPUP_TYPE.HeavenUnlockExtraRewardPanel},
|
||||
[24] = {view = require("Modules/Popup/View/GeneralPopup_XiaoYaoYouItemExchange"), panelName = "GeneralPopup_XiaoYaoYouItemExchange",type=GENERAL_POPUP_TYPE.XiaoYaoYouItemExchange},
|
||||
}
|
||||
--子模块预设
|
||||
local contentPrefabs={}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,77 @@
|
|||
----- 归元弹窗 -----
|
||||
local this = {}
|
||||
--传入父脚本模块
|
||||
local parent
|
||||
--层级
|
||||
local sortingOrder = 0
|
||||
--传入不定参
|
||||
local _args = {}
|
||||
local itemviews = {}
|
||||
local itemId = 0
|
||||
local heroConfig=ConfigManager.GetConfig(ConfigName.HeroConfig)
|
||||
local itemConfig=ConfigManager.GetConfig(ConfigName.ItemConfig)
|
||||
|
||||
function this:InitComponent(gameObject)
|
||||
this.titleText = Util.GetGameObject(gameObject, "TitleText"):GetComponent("Text")
|
||||
this.bodyText = Util.GetGameObject(gameObject, "BodyText"):GetComponent("Text")
|
||||
this.cancelBtn = Util.GetGameObject(gameObject, "CancelBtn")
|
||||
this.confirmBtn = Util.GetGameObject(gameObject, "ConfirmBtn")
|
||||
this.tipText = Util.GetGameObject(gameObject, "tipText"):GetComponent("Text")
|
||||
this.addBtn = Util.GetGameObject(gameObject, "addBtn")
|
||||
this.root = Util.GetGameObject(gameObject, "Root/Content")
|
||||
end
|
||||
|
||||
function this:BindEvent()
|
||||
Util.AddClick(this.cancelBtn,function()
|
||||
parent:ClosePanel()
|
||||
end)
|
||||
Util.AddClick(this.confirmBtn,function()
|
||||
local count = 1
|
||||
if BagManager.GetItemCountById(itemId) > 0 then
|
||||
ShopManager.RequestBuyShopItem(7, 10033, count, function()
|
||||
PopupTipPanel.ShowTip("恢复50点云游值!")
|
||||
parent:ClosePanel()
|
||||
end)
|
||||
else
|
||||
PopupTipPanel.ShowTip("云游宝玉不足")
|
||||
end
|
||||
end)
|
||||
Util.AddClick(this.addBtn,function()
|
||||
UIManager.OpenPanel(UIName.ShopBuyPopup, 7,10032)
|
||||
parent:ClosePanel()
|
||||
end)
|
||||
end
|
||||
|
||||
function this:AddListener()
|
||||
end
|
||||
|
||||
function this:RemoveListener()
|
||||
end
|
||||
|
||||
function this:OnShow(_parent,...)
|
||||
parent=_parent
|
||||
sortingOrder =_parent.sortingOrder
|
||||
local args = {...}
|
||||
itemId = args[1]
|
||||
|
||||
this.titleText.text=itemConfig[itemId].Name
|
||||
this.bodyText.text = itemConfig[itemId].ItemDescribe
|
||||
this.tipText.text = "剩余数量:"..BagManager.GetItemCountById(itemId)
|
||||
for i,v in pairs(itemviews) do
|
||||
v.gameObject:SetActive(false)
|
||||
end
|
||||
if not itemviews[1] then
|
||||
itemviews[1] = SubUIManager.Open(SubUIConfig.ItemView,this.root.transform)
|
||||
end
|
||||
itemviews[1].gameObject:SetActive(true)
|
||||
itemviews[1]:OnOpen(false,{itemId,0},1,false)
|
||||
end
|
||||
|
||||
function this:OnClose()
|
||||
end
|
||||
|
||||
function this:OnDestroy()
|
||||
itemviews={}
|
||||
end
|
||||
|
||||
return this
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c5aeeac8f9b313c4a99bf9e24c6fcb09
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -39,6 +39,7 @@ function this:InitComponent()
|
|||
|
||||
-- 逍遥点刷新倒计时显示
|
||||
this.bgTime = Util.GetGameObject(self.gameObject, "costProp/Bgtime")
|
||||
this.addItmBtn = Util.GetGameObject(self.gameObject, "costProp/add")
|
||||
this.actCountTime = Util.GetGameObject(this.bgTime, "time"):GetComponent("Text")
|
||||
|
||||
this.youliTag = Util.GetGameObject(self.gameObject, "mapParent/TT/youli")
|
||||
|
|
@ -47,6 +48,10 @@ end
|
|||
|
||||
--绑定事件(用于子类重写)
|
||||
function this:BindEvent()
|
||||
Util.AddClick(this.addItmBtn, function ()
|
||||
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.XiaoYaoYouItemExchange,98)
|
||||
end)
|
||||
|
||||
Util.AddClick(this.btnBack, function ()
|
||||
XiaoYaoManager.OpenMapList()
|
||||
self:ClosePanel()
|
||||
|
|
|
|||
Loading…
Reference in New Issue