【七界试炼】提交
parent
e466ee664b
commit
f8c29542ef
|
@ -5433,7 +5433,7 @@ ParticleSystem:
|
|||
--- !u!199 &5104331235060178184
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -10438,7 +10438,7 @@ ParticleSystem:
|
|||
--- !u!199 &8643527419215915995
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -15709,7 +15709,7 @@ ParticleSystem:
|
|||
--- !u!199 &4987984508322184416
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -17081,7 +17081,7 @@ GameObject:
|
|||
- component: {fileID: 1105627976995990997}
|
||||
- component: {fileID: 5165932164217550951}
|
||||
m_Layer: 5
|
||||
m_Name: otherBtn2
|
||||
m_Name: otherBtn3
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
|
@ -17281,7 +17281,7 @@ GameObject:
|
|||
- component: {fileID: 6030235411572590310}
|
||||
- component: {fileID: 5053783813161289008}
|
||||
m_Layer: 5
|
||||
m_Name: otherBtn3
|
||||
m_Name: otherBtn4
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
|
@ -22582,7 +22582,7 @@ ParticleSystem:
|
|||
--- !u!199 &3262653027282754651
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -27551,7 +27551,7 @@ ParticleSystem:
|
|||
--- !u!199 &253417761310031868
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -27965,7 +27965,7 @@ GameObject:
|
|||
- component: {fileID: 3562635372485036634}
|
||||
- component: {fileID: 3005330836724967979}
|
||||
m_Layer: 5
|
||||
m_Name: HightLadderBtn
|
||||
m_Name: otherBtn1
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
|
@ -32986,7 +32986,7 @@ ParticleSystem:
|
|||
--- !u!199 &2319293122981156966
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -33221,7 +33221,7 @@ GameObject:
|
|||
- component: {fileID: 8988116095998275295}
|
||||
- component: {fileID: 1363374061413618413}
|
||||
m_Layer: 5
|
||||
m_Name: otherBtn1
|
||||
m_Name: otherBtn2
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
|
@ -38264,7 +38264,7 @@ ParticleSystem:
|
|||
--- !u!199 &7771438493932148345
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -43288,7 +43288,7 @@ ParticleSystem:
|
|||
--- !u!199 &1758218800894468996
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -48309,7 +48309,7 @@ ParticleSystem:
|
|||
--- !u!199 &7978786288442372732
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -53436,7 +53436,7 @@ ParticleSystem:
|
|||
--- !u!199 &2554868232433594259
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
|
|
@ -323,4 +323,6 @@ end
|
|||
---------------------------------------------
|
||||
--跨服天梯结束
|
||||
---------------------------------------------
|
||||
----
|
||||
---------------------------------------------跨服界面逻辑----------------------------
|
||||
return this
|
|
@ -1,14 +1,10 @@
|
|||
require("Base/BasePanel")
|
||||
JumpServerPanel = Inherit(BasePanel)
|
||||
local this = JumpServerPanel
|
||||
local orginLayer = 0
|
||||
local carbons = {}
|
||||
local carbonsRedPoint = {}
|
||||
local specialConfig = ConfigManager.GetConfig(ConfigName.SpecialConfig)
|
||||
local type = {
|
||||
[1] = {
|
||||
[1] = {
|
||||
id = JumpServer_Type.HightLadder, --跨服天梯
|
||||
bg = "r_Dungeon_rendi_01",
|
||||
bg = "r_Dungeon_rendi_01",
|
||||
name = "k_kuafuwanfa_luofuzhengfeng",
|
||||
live = "m_chsm_0035_png",
|
||||
livePos = Vector2(274.5, -408.1),
|
||||
|
@ -16,64 +12,55 @@ local type = {
|
|||
tipBg = "r_Dungeon_juqingdian",
|
||||
resetTime = string.format("<color=#BA9AC2>%s</color>",specialConfig[97].Value),
|
||||
tip = string.format("<color=#BA9AC2>%s</color>",specialConfig[97].Value),
|
||||
redPointType = RedPointType.JumpServer_HightLadder
|
||||
redPointType = RedPointType.JumpServer_HightLadder,
|
||||
tipStr = "",
|
||||
state = 0
|
||||
},
|
||||
[2] = {
|
||||
[2] = {
|
||||
id = -1,
|
||||
bg = "r_Dungeon_rendi_01"
|
||||
},
|
||||
[3] = {
|
||||
[3] = {
|
||||
id = -1,
|
||||
bg = "r_Dungeon_rendi_01"
|
||||
},
|
||||
[4] = {
|
||||
[4] = {
|
||||
id = -1,
|
||||
bg = "r_Dungeon_rendi_01"
|
||||
},
|
||||
}
|
||||
local state,tipStr
|
||||
|
||||
--初始化组件(用于子类重写)
|
||||
function JumpServerPanel:InitComponent()
|
||||
this.spLoader = SpriteLoader.New()
|
||||
self.spLoader = SpriteLoader.New()
|
||||
-- 屏幕适配修改
|
||||
this.btnRoot = Util.GetGameObject(self.gameObject, "btnRoot")
|
||||
this.btnRoot.transform.localScale = Vector3.one * UIManager.adapterScale
|
||||
carbons = {}
|
||||
carbonsRedPoint = {}
|
||||
this.hightLadderBtn = Util.GetGameObject(self.gameObject, "btnRoot/circle/root/HightLadderBtn")
|
||||
table.insert(carbons, this.hightLadderBtn)
|
||||
table.insert(carbonsRedPoint, Util.GetGameObject(this.hightLadderBtn, "bg/carbon/redPoint"))
|
||||
this.otherBtn1 = Util.GetGameObject(self.gameObject, "btnRoot/circle/root/otherBtn1")
|
||||
table.insert(carbons, this.otherBtn1)
|
||||
table.insert(carbonsRedPoint, Util.GetGameObject(this.otherBtn1, "bg/carbon/redPoint"))
|
||||
this.otherBtn2 = Util.GetGameObject(self.gameObject, "btnRoot/circle/root/otherBtn2")
|
||||
table.insert(carbons, this.otherBtn2)
|
||||
table.insert(carbonsRedPoint, Util.GetGameObject(this.otherBtn2, "bg/carbon/redPoint"))
|
||||
this.otherBtn3 = Util.GetGameObject(self.gameObject, "btnRoot/circle/root/otherBtn3")
|
||||
table.insert(carbons, this.otherBtn3)
|
||||
table.insert(carbonsRedPoint, Util.GetGameObject(this.otherBtn3, "bg/carbon/redPoint"))
|
||||
self.btnRoot = Util.GetGameObject(self.gameObject, "btnRoot")
|
||||
self.btnRoot.transform.localScale = Vector3.one * UIManager.adapterScale
|
||||
self.carbons = {}
|
||||
self.carbonsRedPoint = {}
|
||||
|
||||
for i = 1, #type do
|
||||
local btn = Util.GetGameObject(self.gameObject, "btnRoot/circle/root/otherBtn"..i)
|
||||
table.insert(self.carbons, btn)
|
||||
table.insert(self.carbonsRedPoint, Util.GetGameObject(btn, "bg/carbon/redPoint"))
|
||||
end
|
||||
|
||||
this.effect = Util.GetGameObject(self.gameObject, "CarbonTypePanel_effect")
|
||||
this.wind = Util.GetGameObject(self.gameObject, "CarbonTypePanel_effect/juneng_chenggong/GameObject")
|
||||
self.effect = Util.GetGameObject(self.gameObject, "CarbonTypePanel_effect")
|
||||
self.wind = Util.GetGameObject(self.gameObject, "CarbonTypePanel_effect/juneng_chenggong/GameObject")
|
||||
self.backBtn = Util.GetGameObject(self.gameObject, "backBtn")
|
||||
self.AnimRoot = Util.GetGameObject(self.gameObject, "btnRoot/circle/root")
|
||||
|
||||
orginLayer = 0
|
||||
|
||||
this.backBtn = Util.GetGameObject(self.gameObject, "backBtn")
|
||||
this.AnimRoot = Util.GetGameObject(self.gameObject, "btnRoot/circle/root")
|
||||
|
||||
this.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform)
|
||||
self.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform)
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
function JumpServerPanel:BindEvent()
|
||||
Util.AddClick(this.backBtn,function()
|
||||
Util.AddClick(self.backBtn,function()
|
||||
self:ClosePanel()
|
||||
end)
|
||||
for i = 1, #type do
|
||||
if type[i].redPointType and carbons[i] then
|
||||
BindRedPointObject(type[i].redPointType, carbonsRedPoint[i])
|
||||
if type[i].redPointType and self.carbons[i] then
|
||||
BindRedPointObject(type[i].redPointType, self.carbonsRedPoint[i])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -88,86 +75,76 @@ end
|
|||
|
||||
--跨服
|
||||
function JumpServerPanel:OnOpen()
|
||||
this.UpView:OnOpen({showType = UpViewOpenType.ShowLeft, panelType = PanelType.Main})
|
||||
self.UpView:OnOpen({showType = UpViewOpenType.ShowLeft, panelType = PanelType.Main})
|
||||
end
|
||||
|
||||
--界面打开时调用(用于子类重写)
|
||||
function JumpServerPanel:OnShow(...)
|
||||
for i = 1, #type do
|
||||
if type[i].redPointType and carbons[i] then
|
||||
if type[i].redPointType and self.carbons[i] then
|
||||
CheckRedPointStatus(type[i].redPointType)
|
||||
end
|
||||
end
|
||||
this.UpdateCarbonContent()
|
||||
self:UpdateCarbonContent()
|
||||
-- 音效
|
||||
-- SoundManager.PlayMusic(SoundConfig.BGM_Carbon)
|
||||
end
|
||||
|
||||
function this.UpdateCarbonContent()
|
||||
for k,v in ipairs(carbons) do
|
||||
function JumpServerPanel:UpdateCarbonContent()
|
||||
for k,v in ipairs(self.carbons) do
|
||||
local data = type[k]
|
||||
Util.GetGameObject(v, "bg"):GetComponent("Image").sprite = this.spLoader:LoadSprite(data.bg)
|
||||
Util.GetGameObject(v, "bg"):GetComponent("Image").sprite = self.spLoader:LoadSprite(data.bg)
|
||||
if data.id == -1 then
|
||||
Util.GetGameObject(v, "bg/carbon"):SetActive(false)
|
||||
Util.GetGameObject(v, "bg/InfoBg"):SetActive(false)
|
||||
Util.GetGameObject(v, "bg/Text").gameObject:SetActive(true)
|
||||
v:GetComponent("Button").enabled = false
|
||||
Util.SetGray(v,true)
|
||||
else
|
||||
else
|
||||
Util.GetGameObject(v, "bg/carbon"):SetActive(true)
|
||||
Util.GetGameObject(v, "bg/InfoBg"):SetActive(true)
|
||||
Util.GetGameObject(v, "bg/InfoBg/InfoBg"):SetActive(false)
|
||||
Util.GetGameObject(v, "bg/Text").gameObject:SetActive(false)
|
||||
Util.GetGameObject(v, "bg/Text").gameObject:SetActive(false)
|
||||
v:GetComponent("Button").enabled = true
|
||||
local live = Util.GetGameObject(v, "bg/carbon/Live")
|
||||
local name = Util.GetGameObject(v, "bg/carbon/Name")
|
||||
local timeReset = Util.GetGameObject(v, "bg/InfoBg/timeReset")
|
||||
-- local di = Util.GetGameObject(v, "bg/InfoBg/InfoBg/Image")
|
||||
-- local dropContent = Util.GetGameObject(v, "bg/InfoBg/InfoBg/dropContent")
|
||||
live:GetComponent("Image").sprite =this.spLoader:LoadSprite(data.live)
|
||||
live:GetComponent("Image").sprite = self.spLoader:LoadSprite(data.live)
|
||||
live:GetComponent("RectTransform").localPosition = data.livePos
|
||||
live:GetComponent("RectTransform").sizeDelta = data.liveSize
|
||||
name:GetComponent("Image").sprite = this.spLoader:LoadSprite(data.name)
|
||||
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
|
||||
name:GetComponent("Image").sprite = self.spLoader:LoadSprite(data.name)
|
||||
timeReset:GetComponent("Text").text = string.format(data.resetTime)
|
||||
self:SystemState(data.id,function()
|
||||
if type[k].state < 0 then
|
||||
timeReset:GetComponent("Text").text = type[k].tipStr
|
||||
Util.SetGray(v,true)
|
||||
else
|
||||
Util.SetGray(v,false)
|
||||
end
|
||||
end)
|
||||
-- dropContent:GetComponent("Text").text =string.format(data.tip)
|
||||
-- di:GetComponent("Image").sprite = this.spLoader:LoadSprite(data.tipBg)
|
||||
Util.AddOnceClick(v,function()
|
||||
this.BtnClick(data.id)
|
||||
self:BtnClick(data.id)
|
||||
end)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function this.BtnClick(id)
|
||||
function JumpServerPanel:BtnClick(id)
|
||||
if id <= 0 then PopupTipPanel.ShowTip("敬请期待") return end
|
||||
if type[id].state ~= 1 then PopupTipPanel.ShowTip(type[id].tipStr) return end
|
||||
|
||||
if id == JumpServer_Type.HightLadder then
|
||||
-- this.SystemState(id,function()
|
||||
if state == 1 then
|
||||
UIManager.OpenPanel(UIName.JumpServerHightLadderPanel)
|
||||
else
|
||||
PopupTipPanel.ShowTip(tipStr)
|
||||
end
|
||||
-- end)
|
||||
else
|
||||
PopupTipPanel.ShowTip("敬请期待")
|
||||
UIManager.OpenPanel(UIName.JumpServerHightLadderPanel)
|
||||
end
|
||||
end
|
||||
|
||||
function this:OnSortingOrderChange()
|
||||
Util.AddParticleSortLayer(this.effect, self.sortingOrder - orginLayer)
|
||||
Util.AddParticleSortLayer(this.wind, self.sortingOrder - orginLayer)
|
||||
function JumpServerPanel:OnSortingOrderChange()
|
||||
Util.AddParticleSortLayer(self.effect, self.sortingOrder + 1)
|
||||
Util.AddParticleSortLayer(self.wind, self.sortingOrder + 1)
|
||||
end
|
||||
|
||||
function this.SystemState(id,fun)
|
||||
function JumpServerPanel:SystemState(id,fun)
|
||||
if id <= 0 then return -6,"敬请期待" end
|
||||
local func = function ()
|
||||
if fun then
|
||||
fun()
|
||||
|
@ -176,41 +153,38 @@ function this.SystemState(id,fun)
|
|||
return
|
||||
end
|
||||
if id == JumpServer_Type.HightLadder then
|
||||
--判断功能是否开启
|
||||
if not ActTimeCtrlManager.IsQualifiled(FUNCTION_OPEN_TYPE.JumpServer_HightLadder) then
|
||||
state = -1
|
||||
tipStr = ActTimeCtrlManager.GetFuncTip( FUNCTION_OPEN_TYPE.JumpServer_HightLadder)
|
||||
type[id].state = -1
|
||||
type[id].tipStr = ActTimeCtrlManager.GetFuncTip( FUNCTION_OPEN_TYPE.JumpServer_HightLadder)
|
||||
end
|
||||
--判断世界等级是否够
|
||||
local conFigWorldLevel = ConfigManager.GetConfigData(ConfigName.MServerArenaSetting,1).WorldLevel
|
||||
if PlayerManager.worldLeve < conFigWorldLevel then --如果世界等级不足
|
||||
state = -2
|
||||
tipStr = string.format("世界等级到达%s后开启!",conFigWorldLevel)
|
||||
type[id].state = -2
|
||||
type[id].tipStr = string.format("世界等级到达%s后开启!",conFigWorldLevel)
|
||||
func()
|
||||
end
|
||||
--判断是否在赛季中
|
||||
if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.JumpServer_HightLadder) == false then --如果未解锁
|
||||
state = -3
|
||||
tipStr = "赛季过渡中!"
|
||||
type[id].state = -3
|
||||
type[id].tipStr = "赛季过渡中!"
|
||||
func()
|
||||
end
|
||||
JumpServerManager.GetWorldArenaInfoRequest(function()
|
||||
if not JumpServerManager.GetHightLadderDataIsStart() then
|
||||
state = -4
|
||||
tipStr = string.format("开服第%s周开放!",ConfigManager.GetConfigData(ConfigName.MServerArenaSetting,1).OpenWeek)
|
||||
func()
|
||||
type[id].state = -4
|
||||
type[id].tipStr = string.format("开服第%s周开放!",ConfigManager.GetConfigData(ConfigName.MServerArenaSetting,1).OpenWeek)
|
||||
elseif not JumpServerManager.GetHightLadderDataIsGroup() then
|
||||
state = -5
|
||||
tipStr = "未划分跨服分组,无法参与!"
|
||||
func()
|
||||
type[id].state = -5
|
||||
type[id].tipStr = "未划分跨服分组,无法参与!"
|
||||
else
|
||||
state = 1
|
||||
tipStr = ""
|
||||
func()
|
||||
type[id].state = 1
|
||||
type[id].tipStr = ""
|
||||
end
|
||||
func()
|
||||
end)
|
||||
else
|
||||
-- PopupTipPanel.ShowTip("敬请期待")
|
||||
return -6,"敬请期待"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--界面关闭时调用(用于子类重写)
|
||||
|
@ -219,13 +193,13 @@ end
|
|||
|
||||
--界面销毁时调用(用于子类重写)
|
||||
function JumpServerPanel:OnDestroy()
|
||||
carbons = {}
|
||||
self.carbons = {}
|
||||
for i = 1, #type do
|
||||
if type[i].redPointType and carbons[i] then
|
||||
ClearRedPointObject(type[i].redPointType, carbonsRedPoint[i])
|
||||
if type[i].redPointType and self.carbons[i] then
|
||||
ClearRedPointObject(type[i].redPointType, self.carbonsRedPoint[i])
|
||||
end
|
||||
end
|
||||
this.spLoader:Destroy()
|
||||
self.spLoader:Destroy()
|
||||
end
|
||||
|
||||
return JumpServerPanel
|
Loading…
Reference in New Issue