【心愿抽卡】增加初始化操作

dev_chengFeng
ZhangBiao 2021-06-30 12:01:39 +08:00
parent 782b20fa0c
commit 55bdc21a99
2 changed files with 8 additions and 4 deletions

View File

@ -61,7 +61,7 @@ end
function this:Refresh(isTop,isAni)
local data = tonumber(specialConfig[119].Value)
if RecruitManager.drawTimes[1] < data then
if not RecruitManager.drawTimes[1] or RecruitManager.drawTimes[1] < data then
self.parent:ClosePanel()
end
self.selectBtn:GetComponent("RectTransform").localPosition = self.tabListObj[self.curSelect]:GetComponent("RectTransform").localPosition

View File

@ -96,10 +96,14 @@ function RecruitPanel:BindEvent()
--心愿抽卡界面
Util.AddClick(this.wishBtn, function()
local data = tonumber(specialConfig[119].Value)
if RecruitManager.drawTimes[1] >= data then
UIManager.OpenPanel(UIName.GeneralBigPopup,GENERAL_POPUP_TYPE.WishDraw)
if RecruitManager.drawTimes[1] then
if RecruitManager.drawTimes[1] >= data then
UIManager.OpenPanel(UIName.GeneralBigPopup,GENERAL_POPUP_TYPE.WishDraw)
else
PopupTipPanel.ShowTip(string.format("%s次神将召唤后开启心愿抽卡",data - RecruitManager.drawTimes[1]))
end
else
PopupTipPanel.ShowTip(string.format("%s次神将召唤后开启心愿抽卡",data - RecruitManager.drawTimes[1]))
PopupTipPanel.ShowTip(string.format("%s次神将召唤后开启心愿抽卡",data))
end
end)
end