【关卡挂机】未解锁跳转功能添加
parent
f4b2a09f08
commit
5bfb89d276
|
@ -231,7 +231,7 @@ function FightPointPassMainPanel:InitComponent()
|
||||||
this.OpenSeverWelfareInfoText = Util.GetGameObject(this.OpenSeverWelfare, "info"):GetComponent("Text")
|
this.OpenSeverWelfareInfoText = Util.GetGameObject(this.OpenSeverWelfare, "info"):GetComponent("Text")
|
||||||
this.OpenSeverWelfareRed = Util.GetGameObject(this.OpenSeverWelfare, "redpot")
|
this.OpenSeverWelfareRed = Util.GetGameObject(this.OpenSeverWelfare, "redpot")
|
||||||
this.battleUpLvTip = Util.GetGameObject(self.gameObject, "Bg/btnDown/battleUpLvTip")
|
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 = Util.GetGameObject(self.gameObject, "Bg/LeftUp/box/btnFightLevel")
|
||||||
this.btnFightLevel:SetActive(false)
|
this.btnFightLevel:SetActive(false)
|
||||||
|
@ -486,7 +486,6 @@ function FightPointPassMainPanel:OnShow()
|
||||||
this.UpdateOpenSeverWelfare()
|
this.UpdateOpenSeverWelfare()
|
||||||
|
|
||||||
PlayerManager.StarBattleUpLvTipTime(2)
|
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))
|
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.refreshVipTask()
|
||||||
-- 刷新解锁信息显示
|
-- 刷新解锁信息显示
|
||||||
this.RefreshOpenTips()
|
this.RefreshOpenTips()
|
||||||
|
--
|
||||||
|
this.battleUpLvTip:SetActive(false)
|
||||||
|
this.RefreshBattleUpLvTip(true)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -1042,8 +1044,72 @@ function this.RemainTimeDown(_timeTextExpertgo,_timeTextExpert,timeDown)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function this.RefreshBattleUpLvTip()
|
function this.RefreshBattleUpLvTip(isShowUIOpen)
|
||||||
this.battleUpLvTip:SetActive(true)
|
--
|
||||||
|
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
|
end
|
||||||
|
|
||||||
function this.UpdateWordLv()
|
function this.UpdateWordLv()
|
||||||
|
|
|
@ -305,6 +305,7 @@ function this.CheckFightOpenRule(fightId)
|
||||||
local tips = {}
|
local tips = {}
|
||||||
local btnTxts = {}
|
local btnTxts = {}
|
||||||
for index, rule in ipairs(openRule) do
|
for index, rule in ipairs(openRule) do
|
||||||
|
states[index] = true
|
||||||
if not rule[1] or rule[1] == 0 then
|
if not rule[1] or rule[1] == 0 then
|
||||||
LogRed("当前:没有限制条件1")
|
LogRed("当前:没有限制条件1")
|
||||||
states[index] = true
|
states[index] = true
|
||||||
|
@ -374,7 +375,7 @@ function this.CheckFightOpenRule(fightId)
|
||||||
local tip = ""
|
local tip = ""
|
||||||
local btnTxt = ""
|
local btnTxt = ""
|
||||||
local isOk = true
|
local isOk = true
|
||||||
for index, state in pairs(states) do
|
for index, state in ipairs(states) do
|
||||||
if not state then
|
if not state then
|
||||||
isOk = false
|
isOk = false
|
||||||
-- 提示文字
|
-- 提示文字
|
||||||
|
@ -391,7 +392,7 @@ function this.CheckFightOpenRule(fightId)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return isOk, tip.."解锁", btnTxt
|
return isOk, tip.."解锁", btnTxt, states
|
||||||
end
|
end
|
||||||
LogRed("当前:没有限制条件2")
|
LogRed("当前:没有限制条件2")
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in New Issue