【关卡挂机】未解锁跳转功能添加
parent
f4b2a09f08
commit
5bfb89d276
|
@ -231,7 +231,7 @@ function FightPointPassMainPanel:InitComponent()
|
|||
this.OpenSeverWelfareInfoText = Util.GetGameObject(this.OpenSeverWelfare, "info"):GetComponent("Text")
|
||||
this.OpenSeverWelfareRed = Util.GetGameObject(this.OpenSeverWelfare, "redpot")
|
||||
this.battleUpLvTip = Util.GetGameObject(self.gameObject, "Bg/btnDown/battleUpLvTip")
|
||||
Util.GetGameObject(self.gameObject, "Bg/btnDown/battleUpLvTip/Text"):GetComponent("Text").text = Language[10610]
|
||||
this.battleUpLvTipTxt = Util.GetGameObject(self.gameObject, "Bg/btnDown/battleUpLvTip/Text"):GetComponent("Text")
|
||||
--山河社稷图
|
||||
this.btnFightLevel = Util.GetGameObject(self.gameObject, "Bg/LeftUp/box/btnFightLevel")
|
||||
this.btnFightLevel:SetActive(false)
|
||||
|
@ -486,7 +486,6 @@ function FightPointPassMainPanel:OnShow()
|
|||
this.UpdateOpenSeverWelfare()
|
||||
|
||||
PlayerManager.StarBattleUpLvTipTime(2)
|
||||
this.battleUpLvTip:SetActive(false)
|
||||
Util.GetGameObject(this.btnXiaoYao,"curValue/num"):GetComponent("Text").text=string.format("%d/%d",BagManager.GetItemCountById(UpViewRechargeType.YunYouVle),PrivilegeManager.GetPrivilegeNumber(39))
|
||||
|
||||
-- 刷新一次编队战斗力
|
||||
|
@ -497,6 +496,9 @@ function FightPointPassMainPanel:OnShow()
|
|||
this.refreshVipTask()
|
||||
-- 刷新解锁信息显示
|
||||
this.RefreshOpenTips()
|
||||
--
|
||||
this.battleUpLvTip:SetActive(false)
|
||||
this.RefreshBattleUpLvTip(true)
|
||||
end
|
||||
|
||||
|
||||
|
@ -1042,8 +1044,72 @@ function this.RemainTimeDown(_timeTextExpertgo,_timeTextExpert,timeDown)
|
|||
end
|
||||
end
|
||||
end
|
||||
function this.RefreshBattleUpLvTip()
|
||||
this.battleUpLvTip:SetActive(true)
|
||||
function this.RefreshBattleUpLvTip(isShowUIOpen)
|
||||
--
|
||||
Util.AddOnceClick(this.battleUpLvTip, function() end)
|
||||
this.battleUpLvTip:GetComponent("Image").raycastTarget = false
|
||||
-- 么解锁章节不显示
|
||||
if not FightPointPassManager.IsChapterClossState() then
|
||||
return
|
||||
end
|
||||
|
||||
-- 判断状态
|
||||
local curFightId = FightPointPassManager.GetCurFightId()
|
||||
local isOk, tip, btnTxt, lockState = FightPointPassManager.CheckFightOpenRule(curFightId)
|
||||
|
||||
-- 可以挑战显示 挑战关卡快速升级
|
||||
if not isShowUIOpen and isOk then
|
||||
this.battleUpLvTipTxt.text = Language[10610]
|
||||
this.battleUpLvTip:SetActive(true)
|
||||
return
|
||||
end
|
||||
|
||||
-- 没有解锁条件不显示
|
||||
local openRule = fightLevelConfig[curFightId].OpenRule
|
||||
if not openRule then
|
||||
return
|
||||
end
|
||||
|
||||
-- 没有数据不显示
|
||||
if not lockState then
|
||||
return
|
||||
end
|
||||
|
||||
--
|
||||
for index, state in ipairs(lockState) do
|
||||
if not state and openRule[index] then
|
||||
local ruleType = openRule[index][1]
|
||||
if ruleType then
|
||||
if ruleType == 1 then
|
||||
-- 山河社稷图
|
||||
this.battleUpLvTipTxt.text = "立即前往>>"
|
||||
this.battleUpLvTip:SetActive(true)
|
||||
this.battleUpLvTip:GetComponent("Image").raycastTarget = true
|
||||
Util.AddOnceClick(this.battleUpLvTip, function()
|
||||
JumpManager.GoJump(36023)
|
||||
end)
|
||||
elseif ruleType == 2 then
|
||||
-- 心魔试炼
|
||||
this.battleUpLvTipTxt.text = "立即前往>>"
|
||||
this.battleUpLvTip:SetActive(true)
|
||||
this.battleUpLvTip:GetComponent("Image").raycastTarget = true
|
||||
Util.AddOnceClick(this.battleUpLvTip, function()
|
||||
JumpManager.GoJump(1011)
|
||||
end)
|
||||
elseif ruleType == 4 then
|
||||
-- 获取神将
|
||||
this.battleUpLvTipTxt.text = "立即前往>>"
|
||||
this.battleUpLvTip:SetActive(true)
|
||||
this.battleUpLvTip:GetComponent("Image").raycastTarget = true
|
||||
Util.AddOnceClick(this.battleUpLvTip, function()
|
||||
JumpManager.GoJump(22001)
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function this.UpdateWordLv()
|
||||
|
|
|
@ -305,6 +305,7 @@ function this.CheckFightOpenRule(fightId)
|
|||
local tips = {}
|
||||
local btnTxts = {}
|
||||
for index, rule in ipairs(openRule) do
|
||||
states[index] = true
|
||||
if not rule[1] or rule[1] == 0 then
|
||||
LogRed("当前:没有限制条件1")
|
||||
states[index] = true
|
||||
|
@ -374,7 +375,7 @@ function this.CheckFightOpenRule(fightId)
|
|||
local tip = ""
|
||||
local btnTxt = ""
|
||||
local isOk = true
|
||||
for index, state in pairs(states) do
|
||||
for index, state in ipairs(states) do
|
||||
if not state then
|
||||
isOk = false
|
||||
-- 提示文字
|
||||
|
@ -391,7 +392,7 @@ function this.CheckFightOpenRule(fightId)
|
|||
end
|
||||
end
|
||||
end
|
||||
return isOk, tip.."解锁", btnTxt
|
||||
return isOk, tip.."解锁", btnTxt, states
|
||||
end
|
||||
LogRed("当前:没有限制条件2")
|
||||
return true
|
||||
|
|
Loading…
Reference in New Issue