罗浮奖励提交
parent
cee117927f
commit
58edbefb0c
File diff suppressed because it is too large
Load Diff
|
|
@ -7,6 +7,9 @@ local expertSortDataTabs = {}--排行
|
|||
local expertRewardSortTabs = {}--排行奖励
|
||||
-- 头像对象管理
|
||||
local activeIndext
|
||||
local curType=1
|
||||
local TabAdapter
|
||||
local SwitchView
|
||||
local TabBox = require("Modules/Common/TabBox")
|
||||
local _TabData={
|
||||
[1] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = "人" },
|
||||
|
|
@ -18,7 +21,7 @@ local _TabFontColor = { default = Color.New(130 / 255, 128 / 255, 120 / 255, 1),
|
|||
select = Color.New(154 / 255, 78 / 255, 36 / 255, 1)}
|
||||
--初始化组件(用于子类重写)
|
||||
function JumpServerHightLadderRewardSortPanel:InitComponent()
|
||||
|
||||
self.spLoader=SpriteLoader.New()
|
||||
self.btnBack = Util.GetGameObject(self.gameObject, "btnBack")
|
||||
self.Title = Util.GetGameObject(self.gameObject, "Title"):GetComponent("Text")
|
||||
--排名
|
||||
|
|
@ -35,7 +38,7 @@ function JumpServerHightLadderRewardSortPanel:InitComponent()
|
|||
self.ScrollView.moveTween.MomentumAmount = 1
|
||||
self.ScrollView.moveTween.Strength = 1
|
||||
|
||||
|
||||
self.tabbox=Util.GetGameObject(self.gameObject, "content3/TabBox")
|
||||
--奖励
|
||||
self.content3 = Util.GetGameObject(self.gameObject, "content3")
|
||||
self.expertRewardSortGrid = Util.GetGameObject(self.gameObject, "content3/scrollRect/grid")
|
||||
|
|
@ -45,34 +48,38 @@ function JumpServerHightLadderRewardSortPanel:InitComponent()
|
|||
end
|
||||
this.myActivityRewardGo = Util.GetGameObject(self.gameObject, "content3/Record")
|
||||
|
||||
this.TabCtrl = TabBox.New()
|
||||
this.TabCtrl:SetTabAdapter(this.TabAdapter)
|
||||
this.TabCtrl:SetChangeTabCallBack(this.SwitchView)
|
||||
this.TabCtrl:Init(this.tabbox, _TabData)
|
||||
-- tab节点显示自定义
|
||||
TabAdapter=function(tab, index, status)
|
||||
local tabLab = Util.GetGameObject(tab, "Text")
|
||||
Util.GetGameObject(tab,"Image"):GetComponent("Image").sprite = self.spLoader:LoadSprite(_TabData[index][status])
|
||||
tabLab:GetComponent("Text").text = _TabData[index].name
|
||||
tabLab:GetComponent("Text").color = _TabFontColor[status]
|
||||
end
|
||||
|
||||
--切换视图
|
||||
SwitchView=function(index)
|
||||
curType=index
|
||||
self:ActivitySortRewardShow()
|
||||
|
||||
end
|
||||
|
||||
|
||||
self.TabCtrl = TabBox.New()
|
||||
self.TabCtrl:SetTabAdapter(TabAdapter)
|
||||
self.TabCtrl:SetChangeTabCallBack(SwitchView)
|
||||
self.TabCtrl:Init(self.tabbox, _TabData)
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
function JumpServerHightLadderRewardSortPanel:BindEvent()
|
||||
|
||||
-- tab节点显示自定义
|
||||
function this.TabAdapter(tab, index, status)
|
||||
local tabLab = Util.GetGameObject(tab, "Text")
|
||||
Util.GetGameObject(tab,"Image"):GetComponent("Image").sprite = this.spLoader:LoadSprite(_TabData[index][status])
|
||||
tabLab:GetComponent("Text").text = _TabData[index].name
|
||||
tabLab:GetComponent("Text").color = _TabFontColor[status]
|
||||
end
|
||||
|
||||
--切换视图
|
||||
function this.SwitchView(index)
|
||||
|
||||
type=_TabData[index].id
|
||||
|
||||
end
|
||||
Util.AddClick(self.btnBack, function()
|
||||
self:ClosePanel()
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
--添加事件监听(用于子类重写)
|
||||
function JumpServerHightLadderRewardSortPanel:AddListener()
|
||||
end
|
||||
|
|
@ -90,15 +97,20 @@ end
|
|||
function JumpServerHightLadderRewardSortPanel:OnShow()
|
||||
self.content2:SetActive(false)
|
||||
self.content3:SetActive(true)
|
||||
self:ActivitySortRewardShow()
|
||||
curType=JumpServerManager.arenaType
|
||||
self.TabCtrl:ChangeTab(curType)
|
||||
--self:ActivitySortRewardShow()
|
||||
self.titleTextExpert.text = Language[10576]
|
||||
end
|
||||
|
||||
--排名奖励1
|
||||
function JumpServerHightLadderRewardSortPanel:ActivitySortRewardShow()
|
||||
local rewardTabs = {}
|
||||
|
||||
for i, v in ConfigPairs(ConfigManager.GetConfig(ConfigName.MServerArenaReward)) do
|
||||
table.insert(rewardTabs,v)
|
||||
if v.PropertyName==curType then
|
||||
table.insert(rewardTabs,v)
|
||||
end
|
||||
end
|
||||
for i = 1, math.max(#rewardTabs, #expertRewardSortTabs) do
|
||||
local go = expertRewardSortTabs[i]
|
||||
|
|
@ -136,7 +148,7 @@ function this.SetGoldExperSortInfo()
|
|||
Util.GetGameObject(this.myActivityRewardGo, "Text"):GetComponent("Text").text = "保持排名可获得"
|
||||
rewardData = {}
|
||||
for i, v in ConfigPairs(ConfigManager.GetConfig(ConfigName.MServerArenaReward)) do
|
||||
if myData.rank >= v.MinRank and myData.rank <= v.MaxRank then
|
||||
if v.PropertyName==JumpServerManager.arenaType and myData.rank >= v.MinRank and myData.rank <= v.MaxRank then
|
||||
rewardData = v
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -310,6 +310,10 @@ function this.JumpServerHightLadderWorshipRedPoint()
|
|||
if not isOpen then
|
||||
return false
|
||||
end
|
||||
local isOpen=CheckFunctionOpen(FUNCTION_OPEN_TYPE.JumpServer_HightLadder)
|
||||
if isOpen==false then
|
||||
return false
|
||||
end
|
||||
local conFigWorldLevel = ConfigManager.GetConfigData(ConfigName.MServerArenaSetting,1).WorldLevel
|
||||
if PlayerManager.worldLeve < conFigWorldLevel then
|
||||
return false
|
||||
|
|
@ -322,7 +326,7 @@ function this.JumpServerHightLadderWorshipRedPoint()
|
|||
-- LogPink("跨服天梯剩余免费挑战次数红点false")
|
||||
return false
|
||||
end
|
||||
if stage == 3 then
|
||||
if stage == 1 then
|
||||
|
||||
local datas = this.GetHightLadderDataArenaInfo()
|
||||
for i = 1, #datas.arenaEnemys do
|
||||
|
|
|
|||
|
|
@ -281,7 +281,7 @@ function this.InitRedPointAllRelate()
|
|||
RPData:SetParent(RedPointType.JumpServer_HightLadder_HaveMianFeiPanel, RedPointType.JumpServer_HightLadder)
|
||||
RPData:SetParent(RedPointType. JumpServer_HightLadder_Worship, RedPointType.JumpServer_HightLadder)
|
||||
--RPData:SetParent(RedPointType. JumpServer_HightLadder, RedPointType.JumpServer_MainCity)
|
||||
RPData:SetParent(RedPointType. JumpServer_HightLadder, RedPointType.Arena)
|
||||
RPData:SetParent(RedPointType.JumpServer_HightLadder, RedPointType.Arena)
|
||||
--鸿蒙阵
|
||||
RPData:SetParent(RedPointType.HongMeng_Evory,RedPointType.HongMeng)
|
||||
RPData:SetParent(RedPointType.HongMeng_OpenBox,RedPointType.HongMeng)
|
||||
|
|
|
|||
Loading…
Reference in New Issue