【跨服天梯】国内提交+1
parent
2c9d4f5c51
commit
eec50395f0
|
|
@ -31,6 +31,7 @@ local type = {
|
||||||
bg = "r_Dungeon_rendi_01"
|
bg = "r_Dungeon_rendi_01"
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
local state,tipStr
|
||||||
|
|
||||||
--初始化组件(用于子类重写)
|
--初始化组件(用于子类重写)
|
||||||
function JumpServerPanel:InitComponent()
|
function JumpServerPanel:InitComponent()
|
||||||
|
|
@ -115,6 +116,7 @@ function this.UpdateCarbonContent()
|
||||||
Util.GetGameObject(v, "bg/InfoBg"):SetActive(false)
|
Util.GetGameObject(v, "bg/InfoBg"):SetActive(false)
|
||||||
Util.GetGameObject(v, "bg/Text").gameObject:SetActive(true)
|
Util.GetGameObject(v, "bg/Text").gameObject:SetActive(true)
|
||||||
v:GetComponent("Button").enabled = false
|
v:GetComponent("Button").enabled = false
|
||||||
|
Util.SetGray(v,true)
|
||||||
else
|
else
|
||||||
Util.GetGameObject(v, "bg/carbon"):SetActive(true)
|
Util.GetGameObject(v, "bg/carbon"):SetActive(true)
|
||||||
Util.GetGameObject(v, "bg/InfoBg"):SetActive(true)
|
Util.GetGameObject(v, "bg/InfoBg"):SetActive(true)
|
||||||
|
|
@ -131,49 +133,34 @@ function this.UpdateCarbonContent()
|
||||||
live:GetComponent("RectTransform").sizeDelta = data.liveSize
|
live:GetComponent("RectTransform").sizeDelta = data.liveSize
|
||||||
name:GetComponent("Image").sprite = this.spLoader:LoadSprite(data.name)
|
name:GetComponent("Image").sprite = this.spLoader:LoadSprite(data.name)
|
||||||
timeReset:GetComponent("Text").text =string.format(data.resetTime)
|
timeReset:GetComponent("Text").text =string.format(data.resetTime)
|
||||||
|
this.SystemState(data.id,function()
|
||||||
|
if state < 0 then
|
||||||
|
timeReset:GetComponent("Text").text = tipStr
|
||||||
|
end
|
||||||
|
if state < 0 then
|
||||||
|
Util.SetGray(v,true)
|
||||||
|
else
|
||||||
|
Util.SetGray(v,false)
|
||||||
|
end
|
||||||
|
end)
|
||||||
-- dropContent:GetComponent("Text").text =string.format(data.tip)
|
-- dropContent:GetComponent("Text").text =string.format(data.tip)
|
||||||
-- di:GetComponent("Image").sprite = this.spLoader:LoadSprite(data.tipBg)
|
-- di:GetComponent("Image").sprite = this.spLoader:LoadSprite(data.tipBg)
|
||||||
Util.AddOnceClick(v,function()
|
Util.AddOnceClick(v,function()
|
||||||
this.BtnClick(data.id)
|
this.BtnClick(data.id)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
if data.id == -1 then
|
|
||||||
Util.SetGray(v,true)
|
|
||||||
else
|
|
||||||
Util.SetGray(v,not ActTimeCtrlManager.SingleFuncState(data.id))
|
|
||||||
-- Util.SetGray(v,not ActTimeCtrlManager.SingleFuncState(data.id))
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function this.BtnClick(id)
|
function this.BtnClick(id)
|
||||||
if id == JumpServer_Type.HightLadder then
|
if id == JumpServer_Type.HightLadder then
|
||||||
if not ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.JumpServer_HightLadder) then
|
-- this.SystemState(id,function()
|
||||||
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip( FUNCTION_OPEN_TYPE.JumpServer_HightLadder))
|
if state == 1 then
|
||||||
return
|
|
||||||
end
|
|
||||||
local conFigWorldLevel = ConfigManager.GetConfigData(ConfigName.MServerArenaSetting,1).WorldLevel
|
|
||||||
if PlayerManager.worldLeve < conFigWorldLevel then --如果世界等级不足
|
|
||||||
PopupTipPanel.ShowTip(string.format("世界等级到达%s后开启!",conFigWorldLevel))
|
|
||||||
return
|
|
||||||
end
|
|
||||||
if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.JumpServer_HightLadder) == false then --如果未解锁
|
|
||||||
-- PopupTipPanel.ShowTip(ActTimeCtrlManager.SystemOpenTip(JumpServer_Type.HightLadder))
|
|
||||||
PopupTipPanel.ShowTip("赛季过渡中!")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
JumpServerManager.GetWorldArenaInfoRequest(function()
|
|
||||||
if not JumpServerManager.GetHightLadderDataIsGroup() then
|
|
||||||
PopupTipPanel.ShowTip("未划分跨服分组,无法参与!")
|
|
||||||
return
|
|
||||||
elseif not JumpServerManager.GetHightLadderDataIsStart() then
|
|
||||||
PopupTipPanel.ShowTip(string.format("开服第%s周开放!",ConfigManager.GetConfigData(ConfigName.MServerArenaSetting,1).OpenWeek))--)--MServerArenaSetting
|
|
||||||
return
|
|
||||||
else
|
|
||||||
UIManager.OpenPanel(UIName.JumpServerHightLadderPanel)
|
UIManager.OpenPanel(UIName.JumpServerHightLadderPanel)
|
||||||
|
else
|
||||||
|
PopupTipPanel.ShowTip(tipStr)
|
||||||
end
|
end
|
||||||
end)
|
-- end)
|
||||||
else
|
else
|
||||||
PopupTipPanel.ShowTip("敬请期待")
|
PopupTipPanel.ShowTip("敬请期待")
|
||||||
end
|
end
|
||||||
|
|
@ -184,6 +171,65 @@ function this:OnSortingOrderChange()
|
||||||
Util.AddParticleSortLayer(this.wind, self.sortingOrder - orginLayer)
|
Util.AddParticleSortLayer(this.wind, self.sortingOrder - orginLayer)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function this.SystemState(id,fun)
|
||||||
|
if id == JumpServer_Type.HightLadder then
|
||||||
|
if not ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.JumpServer_HightLadder) then
|
||||||
|
state = -1
|
||||||
|
tipStr = ActTimeCtrlManager.GetFuncTip( FUNCTION_OPEN_TYPE.JumpServer_HightLadder)
|
||||||
|
if fun then
|
||||||
|
fun()
|
||||||
|
fun = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local conFigWorldLevel = ConfigManager.GetConfigData(ConfigName.MServerArenaSetting,1).WorldLevel
|
||||||
|
if PlayerManager.worldLeve < conFigWorldLevel then --如果世界等级不足
|
||||||
|
state = -2
|
||||||
|
tipStr = string.format("世界等级到达%s后开启!",conFigWorldLevel)
|
||||||
|
if fun then
|
||||||
|
fun()
|
||||||
|
fun = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.JumpServer_HightLadder) == false then --如果未解锁
|
||||||
|
state = -3
|
||||||
|
tipStr = "赛季过渡中!"
|
||||||
|
if fun then
|
||||||
|
fun()
|
||||||
|
fun = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
JumpServerManager.GetWorldArenaInfoRequest(function()
|
||||||
|
if not JumpServerManager.GetHightLadderDataIsStart() then
|
||||||
|
state = -4
|
||||||
|
tipStr = string.format("开服第%s周开放!",ConfigManager.GetConfigData(ConfigName.MServerArenaSetting,1).OpenWeek)
|
||||||
|
if fun then
|
||||||
|
fun()
|
||||||
|
fun = nil
|
||||||
|
end
|
||||||
|
elseif not JumpServerManager.GetHightLadderDataIsGroup() then
|
||||||
|
state = -5
|
||||||
|
tipStr = "未划分跨服分组,无法参与!"
|
||||||
|
if fun then
|
||||||
|
fun()
|
||||||
|
fun = nil
|
||||||
|
end
|
||||||
|
else
|
||||||
|
state = 1
|
||||||
|
tipStr = ""
|
||||||
|
if fun then
|
||||||
|
fun()
|
||||||
|
fun = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
else
|
||||||
|
-- PopupTipPanel.ShowTip("敬请期待")
|
||||||
|
return -6,"敬请期待"
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
--界面关闭时调用(用于子类重写)
|
--界面关闭时调用(用于子类重写)
|
||||||
function JumpServerPanel:OnClose()
|
function JumpServerPanel:OnClose()
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue