[gm]=====开服冲榜提交
parent
dcb2321134
commit
1e62991c2c
Binary file not shown.
After Width: | Height: | Size: 73 KiB |
|
@ -0,0 +1,110 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ed6c00404a0646342ad1bc38ff05bfd1
|
||||||
|
TextureImporter:
|
||||||
|
fileIDToRecycleName: {}
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 9
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 0
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 2
|
||||||
|
aniso: -1
|
||||||
|
mipBias: -100
|
||||||
|
wrapU: 1
|
||||||
|
wrapV: 1
|
||||||
|
wrapW: 1
|
||||||
|
nPOTScale: 0
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 1
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 8
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 2
|
||||||
|
buildTarget: Android
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: 65
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 1
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
buildTarget: iPhone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: 56
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 1
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID: 6406b65c6e2b1ed4db32bfe893f5b012
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
spritePackingTag: GMAltas
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 824413baa3e8d9d49b60dbe90d93d8cf
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -1063,6 +1063,7 @@ RedPointType = {
|
||||||
HomeLand = 700,--主城家园红点
|
HomeLand = 700,--主城家园红点
|
||||||
--战力冲刺
|
--战力冲刺
|
||||||
PowerRice = 710,
|
PowerRice = 710,
|
||||||
|
KaiFuChongBang = 711,--开服冲榜
|
||||||
PowerRiceGool = 7101,--战力目标
|
PowerRiceGool = 7101,--战力目标
|
||||||
|
|
||||||
FestevalRed = 9501,
|
FestevalRed = 9501,
|
||||||
|
@ -1480,6 +1481,7 @@ ActivityTypeDef = {
|
||||||
EastSeaFindGod = 98, --东海寻仙
|
EastSeaFindGod = 98, --东海寻仙
|
||||||
ZhongShenKa = 99, --终身卡
|
ZhongShenKa = 99, --终身卡
|
||||||
shuaChongTeQuan = 10301,--刷冲特权
|
shuaChongTeQuan = 10301,--刷冲特权
|
||||||
|
KaiFuChongBang = 110,--开服冲榜
|
||||||
}
|
}
|
||||||
--活动结束需要处理面板关闭类型
|
--活动结束需要处理面板关闭类型
|
||||||
ActivityTypePanel = {
|
ActivityTypePanel = {
|
||||||
|
@ -2389,6 +2391,9 @@ RANK_TYPE = {
|
||||||
POWER_RICE = 42,--战力冲刺
|
POWER_RICE = 42,--战力冲刺
|
||||||
ExploreRank = 43,--战力冲刺
|
ExploreRank = 43,--战力冲刺
|
||||||
HotHero = 44, --英雄热度
|
HotHero = 44, --英雄热度
|
||||||
|
UpStar =101, --升星排行榜
|
||||||
|
EquipRank =102, --装备排行榜
|
||||||
|
SoulSign =103, --魂印排行榜
|
||||||
}
|
}
|
||||||
|
|
||||||
--东海寻仙弹窗类型
|
--东海寻仙弹窗类型
|
||||||
|
@ -2890,7 +2895,9 @@ rankKingList={ [1] = { bgImage = "r_zjm_paihangbang_banner004_zh", name = "星
|
||||||
[36] = { bgImage = "", name = "" ,rankType = RANK_TYPE.GUILD_CAR_DELEAY_GUILD,activiteId = 0,isRankingMainPanelShow = 4,RankingListMainSortId = 0},
|
[36] = { bgImage = "", name = "" ,rankType = RANK_TYPE.GUILD_CAR_DELEAY_GUILD,activiteId = 0,isRankingMainPanelShow = 4,RankingListMainSortId = 0},
|
||||||
[37] = { bgImage = "", name = "探索排行" ,rankType = RANK_TYPE.ExploreRank,activiteId = 0,isRankingMainPanelShow = false},
|
[37] = { bgImage = "", name = "探索排行" ,rankType = RANK_TYPE.ExploreRank,activiteId = 0,isRankingMainPanelShow = false},
|
||||||
[38] = { bgImage = "r_zjm_paihangbang_banner04_zh", name = Language[12096] ,rankType = RANK_TYPE.FIGHT_LEVEL_RANK,activiteId = 0,isRankingMainPanelShow = 0,RankingListMainSortId = 1},
|
[38] = { bgImage = "r_zjm_paihangbang_banner04_zh", name = Language[12096] ,rankType = RANK_TYPE.FIGHT_LEVEL_RANK,activiteId = 0,isRankingMainPanelShow = 0,RankingListMainSortId = 1},
|
||||||
|
[39] = { bgImage = "", name = "升星排行" ,rankType = RANK_TYPE.UpStar,activiteId = 0,isRankingMainPanelShow = 4,RankingListMainSortId = 0},
|
||||||
|
[40] = { bgImage = "", name = "装备排行" ,rankType = RANK_TYPE.EquipRank,activiteId = 0,isRankingMainPanelShow = 4,RankingListMainSortId = 0},
|
||||||
|
[41] = { bgImage = "", name = "魂印排行" ,rankType = RANK_TYPE.SoulSign,activiteId = 0,isRankingMainPanelShow = 4,RankingListMainSortId = 0},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -267,6 +267,10 @@ ConfigName = {
|
||||||
UniversalWelfareConfig="UniversalWelfareConfig",
|
UniversalWelfareConfig="UniversalWelfareConfig",
|
||||||
GMInfo="GMInfo",
|
GMInfo="GMInfo",
|
||||||
GMMaster="GMMaster",
|
GMMaster="GMMaster",
|
||||||
|
ChongRank="ChongRank",
|
||||||
|
ChongRankInfo="ChongRankInfo",
|
||||||
|
ChongRankInformation ="ChongRankInformation",
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
require "Framework/GameDataBase"
|
require "Framework/GameDataBase"
|
||||||
|
|
|
@ -475,6 +475,7 @@ UIName = {
|
||||||
GMCommonConfirmPanel=483,--gm确认弹窗
|
GMCommonConfirmPanel=483,--gm确认弹窗
|
||||||
GMEspecially=484,--gm创角即送
|
GMEspecially=484,--gm创角即送
|
||||||
GMMingWangPanel=485,--gm名望特权
|
GMMingWangPanel=485,--gm名望特权
|
||||||
|
ActivityChongRank=486,--gm开服冲榜
|
||||||
}
|
}
|
||||||
|
|
||||||
SubUIConfig = {
|
SubUIConfig = {
|
||||||
|
|
|
@ -1175,6 +1175,8 @@ function this:TabBtnAction(id,actType,data)
|
||||||
UIManager.OpenPanel(UIName.ActivityMainPanel,id)
|
UIManager.OpenPanel(UIName.ActivityMainPanel,id)
|
||||||
elseif id == ActivityTypeDef.EastSeaFindGod then
|
elseif id == ActivityTypeDef.EastSeaFindGod then
|
||||||
UIManager.OpenPanel(UIName.EastSeaFindGodPanel,id)
|
UIManager.OpenPanel(UIName.EastSeaFindGodPanel,id)
|
||||||
|
elseif id==ActivityTypeDef.KaiFuChongBang then
|
||||||
|
UIManager.OpenPanel(UIName.ActivityChongRank)
|
||||||
elseif id==102 then
|
elseif id==102 then
|
||||||
--检查当前活动是否开启
|
--检查当前活动是否开启
|
||||||
-- local id = ActivityGiftManager.GetActivityTypeInfo(102)
|
-- local id = ActivityGiftManager.GetActivityTypeInfo(102)
|
||||||
|
|
|
@ -948,6 +948,16 @@ function this.PowerRiceRedCheck()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function this.ChongBangCheckRed()
|
||||||
|
local str = PlayerPrefs.GetInt(PlayerManager.uid.."kaifuchongbang")
|
||||||
|
if str==0 then
|
||||||
|
return true
|
||||||
|
else
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
function this.GetRedPointEastSeaFindGodnew(red)
|
function this.GetRedPointEastSeaFindGodnew(red)
|
||||||
return this.GetRedPointEastSeaFindGod(red%98000)
|
return this.GetRedPointEastSeaFindGod(red%98000)
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,375 @@
|
||||||
|
require("Base/BasePanel")
|
||||||
|
ActivityChongRank = Inherit(BasePanel)
|
||||||
|
local TabBox = require("Modules/Common/TabBox")
|
||||||
|
local this=ActivityChongRank
|
||||||
|
local infoConfig=ConfigManager.GetConfig(ConfigName.ChongRankInfo)
|
||||||
|
local rankConfig=ConfigManager.GetConfig(ConfigName.ChongRank)
|
||||||
|
local curConfig=nil
|
||||||
|
local type=0
|
||||||
|
local btnType=0
|
||||||
|
local rankType=0
|
||||||
|
local ownRank=0
|
||||||
|
local isFirst=false
|
||||||
|
local _TabData={ [1] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = "排行榜"},
|
||||||
|
[2] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = "排名奖励"},
|
||||||
|
}
|
||||||
|
|
||||||
|
function this:InitComponent()
|
||||||
|
this.spLoader = SpriteLoader.New()
|
||||||
|
this.backBtn=Util.GetGameObject(self.gameObject, "bg/btn_close")
|
||||||
|
this.titleImg=Util.GetGameObject(self.gameObject, "bg/name"):GetComponent("Image")
|
||||||
|
this.leftTimeTxt=Util.GetGameObject(self.gameObject, "bg/Image/timebg"):GetComponent("Text")
|
||||||
|
this.grid=Util.GetGameObject(self.gameObject, "bg/tabScroll/grid")
|
||||||
|
this.btnItem=Util.GetGameObject(self.gameObject, "bg/tabBtnPre")
|
||||||
|
this.rewardItem=Util.GetGameObject(self.gameObject, "bg/Rank")
|
||||||
|
this.rankItem=Util.GetGameObject(self.gameObject, "bg/Rank2")
|
||||||
|
this.selectObj=Util.GetGameObject(self.gameObject, "bg/tabSelectBtn")
|
||||||
|
this.infoTxt=Util.GetGameObject(self.gameObject, "bg/title/infoTxt"):GetComponent("Text")
|
||||||
|
this.rewardGrid=Util.GetGameObject(self.gameObject, "bg/rewardGrid")
|
||||||
|
this.rankGrid=Util.GetGameObject(self.gameObject, "bg/rankGrid")
|
||||||
|
this.selectTxt=Util.GetGameObject(self.gameObject, "bg/tabSelectBtn/Text"):GetComponent("Text")
|
||||||
|
this.tabBox=Util.GetGameObject(self.gameObject, "bg/TabBox")
|
||||||
|
this.btn_help=Util.GetGameObject(self.gameObject, "bg/btn_help")
|
||||||
|
local rootHight = this.rewardGrid.transform.rect.height
|
||||||
|
local width = this.rewardGrid.transform.rect.width
|
||||||
|
this.ScrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, this.rewardGrid.transform,this.rewardItem, nil, Vector2.New(width, rootHight), 1, 1, Vector2.New(0,0))
|
||||||
|
this.ScrollView.moveTween.MomentumAmount = 1
|
||||||
|
this.ScrollView.moveTween.Strength = 2
|
||||||
|
this.ScrollView.elastic = false
|
||||||
|
--local rootHight2 = this.rankGrid.transform.rect.height
|
||||||
|
--local width2 = this.rankGrid.transform.rect.width
|
||||||
|
this.rankScrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, this.rankGrid.transform,this.rankItem, nil, Vector2.New(width, rootHight), 1, 1, Vector2.New(0,0))
|
||||||
|
this.rankScrollView.moveTween.MomentumAmount = 1
|
||||||
|
this.rankScrollView.moveTween.Strength = 2
|
||||||
|
this.rankScrollView.elastic = false
|
||||||
|
this.actData = CommonActPageManager.GetData(ActivityTypeDef.KaiFuChongBang)
|
||||||
|
this.btnList={}
|
||||||
|
for _, configInfo in ConfigPairs(infoConfig) do
|
||||||
|
local tabBtn = newObjToParent(this.btnItem, this.grid)
|
||||||
|
Util.GetGameObject(tabBtn, "Text"):GetComponent("Text").text=configInfo.RankName
|
||||||
|
local openTime=this.actData.startTime+configInfo.OpenTime
|
||||||
|
local closeTime=this.actData.startTime+configInfo.CloseTime
|
||||||
|
if GetTimeStamp()>=openTime and GetTimeStamp()<=closeTime then --活动未开启
|
||||||
|
curConfig=configInfo
|
||||||
|
isFirst=true
|
||||||
|
end
|
||||||
|
table.insert(this.btnList,tabBtn)
|
||||||
|
Util.AddClick(tabBtn,function ()
|
||||||
|
btnType=_
|
||||||
|
this.TabBtnOnClick(configInfo,tabBtn)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
--显示货币
|
||||||
|
this.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform)
|
||||||
|
this.itemList = {}
|
||||||
|
end
|
||||||
|
local qaId=0
|
||||||
|
function this:OnShow()
|
||||||
|
PlayerPrefs.SetInt(PlayerManager.uid.."kaifuchongbang",1)
|
||||||
|
end
|
||||||
|
|
||||||
|
function this.TabBtnOnClick(config,btn)
|
||||||
|
this.selectObj.transform:SetParent(btn.transform)
|
||||||
|
this.selectObj.transform.localScale = Vector3.one
|
||||||
|
this.selectObj.transform.localPosition = Vector3.zero
|
||||||
|
this.selectTxt.text=config.RankName
|
||||||
|
qaId=config.QAConfig
|
||||||
|
--设置时间
|
||||||
|
if this.timer then
|
||||||
|
this.timer:Stop()
|
||||||
|
this.timer = nil
|
||||||
|
end
|
||||||
|
local time=0
|
||||||
|
local openTime=this.actData.startTime+config.OpenTime
|
||||||
|
local closeTime=this.actData.startTime+config.CloseTime
|
||||||
|
local state=0
|
||||||
|
if openTime>GetTimeStamp() then --活动未开启
|
||||||
|
time =openTime - GetTimeStamp()
|
||||||
|
state=1
|
||||||
|
elseif closeTime>GetTimeStamp() then --活动进行中
|
||||||
|
time=closeTime-GetTimeStamp()
|
||||||
|
state=2
|
||||||
|
elseif closeTime<GetTimeStamp() then
|
||||||
|
time=0
|
||||||
|
state=3
|
||||||
|
end
|
||||||
|
if state==1 then
|
||||||
|
this.leftTimeTxt.text = string.format("活动开始倒计时:".."%s",TimeToFelaxible(time))
|
||||||
|
elseif state==2 then
|
||||||
|
this.leftTimeTxt.text = string.format(Language[10512].."%s",TimeToFelaxible(time))
|
||||||
|
elseif state==3 then
|
||||||
|
this.leftTimeTxt.text = "活动已结束"
|
||||||
|
end
|
||||||
|
if time~=0 then
|
||||||
|
this.timer = Timer.New(function ()
|
||||||
|
time = time - 1
|
||||||
|
if state==1 then
|
||||||
|
this.leftTimeTxt.text = string.format("活动开始倒计时:".."%s",TimeToFelaxible(time))
|
||||||
|
elseif state==2 then
|
||||||
|
this.leftTimeTxt.text = string.format(Language[10512].."%s",TimeToFelaxible(time))
|
||||||
|
elseif state==3 then
|
||||||
|
this.leftTimeTxt.text = "活动已结束"
|
||||||
|
end
|
||||||
|
if time <= 0 and state~=3 then
|
||||||
|
--this:OnClose()
|
||||||
|
state=3
|
||||||
|
this.ChangeWindow(config)
|
||||||
|
end
|
||||||
|
end,1,-1,true)
|
||||||
|
this.timer:Start()
|
||||||
|
end
|
||||||
|
this.ChangeWindow(config)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function this.ChangeWindow(config)
|
||||||
|
this.titleImg.sprite=this.spLoader:LoadSprite(config.Icon)
|
||||||
|
curConfig=config
|
||||||
|
RankingManager.InitData(config.RankType,function()
|
||||||
|
rankType=config.RankType
|
||||||
|
LogError("ranktype=="..rankType)
|
||||||
|
local ranks,myRank = RankingManager.GetRankingInfo()
|
||||||
|
ownRank=myRank.rank
|
||||||
|
LogError("ranks len======="..#ranks)
|
||||||
|
--this.SetRoleRank(ranks,myRank,true,true)
|
||||||
|
if type==1 then
|
||||||
|
this.rewardGrid:SetActive(false)
|
||||||
|
this.rankGrid:SetActive(true)
|
||||||
|
this.infoTxt.text="玩家信息"
|
||||||
|
-- RankingManager.InitData(config.RankType,function()
|
||||||
|
-- rankType=config.RankType
|
||||||
|
-- LogError("ranktype=="..rankType)
|
||||||
|
-- local ranks,myRank = RankingManager.GetRankingInfo()
|
||||||
|
-- ownRank=myRank.rank
|
||||||
|
-- LogError("ranks len======="..#ranks)
|
||||||
|
this.SetRoleRank(ranks,myRank,true,true)
|
||||||
|
-- end,0,1)
|
||||||
|
elseif type==2 then
|
||||||
|
local list={}
|
||||||
|
this.rewardGrid:SetActive(true)
|
||||||
|
this.rankGrid:SetActive(false)
|
||||||
|
this.infoTxt.text="奖励"
|
||||||
|
for _, configInfo in ConfigPairs(rankConfig) do
|
||||||
|
if configInfo.ChongRankInfoID==config.Id then
|
||||||
|
table.insert(list,configInfo)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
this.ScrollView:SetData(list, function (index, go)
|
||||||
|
this.UpdateRewardInfo(go,list[index])
|
||||||
|
end,false)
|
||||||
|
end
|
||||||
|
end,0,1)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function this:BindEvent()
|
||||||
|
Util.AddClick(this.backBtn,function ()
|
||||||
|
self:ClosePanel()
|
||||||
|
end)
|
||||||
|
|
||||||
|
Util.AddClick(this.btn_help,function ()
|
||||||
|
UIManager.OpenPanel(UIName.HelpPopup,qaId,this.btn_help.transform.localPosition.x,this.btn_help.transform.localPosition.y)
|
||||||
|
end)
|
||||||
|
this.TabCtrl = TabBox.New()
|
||||||
|
this.TabCtrl:SetTabAdapter(this.TabAdapter)
|
||||||
|
this.TabCtrl:SetChangeTabCallBack(this.SwitchView)
|
||||||
|
this.TabCtrl:Init(this.tabBox, _TabData)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 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=index
|
||||||
|
if curConfig==nil then
|
||||||
|
curConfig=infoConfig[1]
|
||||||
|
this.TabBtnOnClick(curConfig,this.btnList[1])
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if isFirst then
|
||||||
|
this.TabBtnOnClick(curConfig,this.btnList[curConfig.Id])
|
||||||
|
return
|
||||||
|
end
|
||||||
|
this.ChangeWindow(curConfig)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function this.UpdateRewardInfo(go,data)
|
||||||
|
local sortNumTabs = {}
|
||||||
|
for i = 1, 4 do
|
||||||
|
sortNumTabs[i] = Util.GetGameObject(go, "sortNum/sortNum ("..i..")")
|
||||||
|
sortNumTabs[i]:SetActive(false)
|
||||||
|
end
|
||||||
|
local reward = Util.GetGameObject(go,"reward")
|
||||||
|
local sort4Text = Util.GetGameObject(sortNumTabs[4],"rankNumberText"):GetComponent("Text")
|
||||||
|
local hintObj=Util.GetGameObject(go,"hint")
|
||||||
|
if ownRank and ownRank>=data.MinRank and ownRank<=data.MaxRank then
|
||||||
|
hintObj:SetActive(true)
|
||||||
|
else
|
||||||
|
hintObj:SetActive(false)
|
||||||
|
end
|
||||||
|
if data.MinRank == data.MaxRank then
|
||||||
|
if data.MaxRank < 4 then
|
||||||
|
sortNumTabs[data.MinRank]:SetActive(true)
|
||||||
|
else
|
||||||
|
sortNumTabs[4]:SetActive(true)
|
||||||
|
sort4Text.text = data.MaxRank
|
||||||
|
end
|
||||||
|
else
|
||||||
|
sortNumTabs[4]:SetActive(true)
|
||||||
|
if data.MaxRank < 0 then
|
||||||
|
sort4Text.text = data.MinRank .."+"
|
||||||
|
else
|
||||||
|
sort4Text.text = data.MinRank .."-".. data.MaxRank
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if not this.itemList[go] then
|
||||||
|
this.itemList[go] = {}
|
||||||
|
end
|
||||||
|
for i = 1, #data.RankingReward do
|
||||||
|
if not this.itemList[go][i] then
|
||||||
|
this.itemList[go][i] = SubUIManager.Open(SubUIConfig.ItemView,reward.transform)
|
||||||
|
end
|
||||||
|
this.itemList[go][i]:OnOpen(false, data.RankingReward[i], 0.8,false,false,false,this.sortingOrder)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 设置玩家排行
|
||||||
|
function this.SetRoleRank(ranks,myRankInfo, isTop, isAnim )
|
||||||
|
--if #ranks == 0 or not ranks then Log(Language[10267]) return end
|
||||||
|
|
||||||
|
local rankFunc = function (index, item)
|
||||||
|
this.UpdateRankInfo(item, ranks[index], myRankInfo.rank)
|
||||||
|
if index==#ranks then
|
||||||
|
RankingManager.RequestNextWarPowerPageData(function()
|
||||||
|
local ranks,myRank = RankingManager.GetRankingInfo()
|
||||||
|
--this.SetPlayerRankInfo(ranks,myRank)
|
||||||
|
this.SetRoleRank(ranks,myRank)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- -- 重置排行列表
|
||||||
|
this.rankScrollView:SetData(ranks, rankFunc, not isTop, not isAnim )
|
||||||
|
end
|
||||||
|
local _PlayerHeadList = {}
|
||||||
|
function this.UpdateRankInfo(go,data)
|
||||||
|
local sortNumTabs = {}
|
||||||
|
for i = 1, 4 do
|
||||||
|
sortNumTabs[i] = Util.GetGameObject(go, "sortNum/sortNum ("..i..")")
|
||||||
|
sortNumTabs[i]:SetActive(false)
|
||||||
|
end
|
||||||
|
local sort4Text = Util.GetGameObject(sortNumTabs[4],"rankNumberText"):GetComponent("Text")
|
||||||
|
if data.rankInfo.rank<4 then
|
||||||
|
sort4Text.gameObject:SetActive(false)
|
||||||
|
sortNumTabs[data.rankInfo.rank]:SetActive(true)
|
||||||
|
else
|
||||||
|
sort4Text.gameObject:SetActive(true)
|
||||||
|
sortNumTabs[4]:SetActive(true)
|
||||||
|
sort4Text.text=data.rankInfo.rank
|
||||||
|
end
|
||||||
|
local head=Util.GetGameObject(go, "head")
|
||||||
|
local nameTxt=Util.GetGameObject(go, "nameTxt"):GetComponent("Text")
|
||||||
|
local warPower = Util.GetGameObject(go,"warPower")
|
||||||
|
local infoTxt = Util.GetGameObject(go,"numTxt"):GetComponent("Text")
|
||||||
|
local starImg = Util.GetGameObject(go,"starImg")
|
||||||
|
local selfObj=Util.GetGameObject(go,"slefBG")
|
||||||
|
selfObj:SetActive(data.rankInfo.rank==ownRank)
|
||||||
|
warPower:SetActive(false)
|
||||||
|
infoTxt.gameObject:SetActive(false)
|
||||||
|
starImg:SetActive(false)
|
||||||
|
nameTxt.text=data.userName
|
||||||
|
if not _PlayerHeadList[go] then
|
||||||
|
_PlayerHeadList[go] = SubUIManager.Open(SubUIConfig.PlayerHeadView, head.transform)
|
||||||
|
end
|
||||||
|
_PlayerHeadList[go]:Reset()
|
||||||
|
_PlayerHeadList[go]:SetHead(data.head)
|
||||||
|
_PlayerHeadList[go]:SetFrame(data.headFrame)
|
||||||
|
_PlayerHeadList[go]:SetLevel(data.level)
|
||||||
|
_PlayerHeadList[go]:SetScale(Vector3.one*0.7)
|
||||||
|
_PlayerHeadList[go]:SetLayer(this.sortingOrder)
|
||||||
|
_PlayerHeadList[go]:SetEffectScale(0.75)
|
||||||
|
if rankType==RANK_TYPE.FORCE_CURR_RANK then --战力排行
|
||||||
|
warPower:SetActive(true)
|
||||||
|
Util.GetGameObject(go,"warPower/Text"):SetActive(true)
|
||||||
|
Util.GetGameObject(go,"warPower/Text"):GetComponent("Text").text = data.rankInfo.param1
|
||||||
|
elseif rankType==RANK_TYPE.FIGHT_LEVEL_RANK then --关卡排行
|
||||||
|
infoTxt.gameObject:SetActive(true)
|
||||||
|
infoTxt.text=GetLanguageStrById(ConfigManager.GetConfigData(ConfigName.MainLevelConfig,data.rankInfo.param1).Name)
|
||||||
|
elseif rankType==RANK_TYPE.MONSTER_RANK then --心魔试炼
|
||||||
|
infoTxt.gameObject:SetActive(true)
|
||||||
|
infoTxt.text=Language[11689].. data.rankInfo.param1
|
||||||
|
elseif rankType==RANK_TYPE.FIGHTLEVEL_STAR or rankType==RANK_TYPE.UpStar then --山河社稷图 升星排行
|
||||||
|
starImg:SetActive(true)
|
||||||
|
infoTxt.gameObject:SetActive(true)
|
||||||
|
infoTxt.text= data.rankInfo.param1
|
||||||
|
elseif rankType==RANK_TYPE.EquipRank then
|
||||||
|
infoTxt.gameObject:SetActive(true)
|
||||||
|
infoTxt.text="装备:"..data.rankInfo.param1
|
||||||
|
elseif rankType==RANK_TYPE.SoulSign then
|
||||||
|
infoTxt.gameObject:SetActive(true)
|
||||||
|
infoTxt.text="魂印:"..data.rankInfo.param1
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
Util.AddOnceClick(go,function()
|
||||||
|
UIManager.OpenPanel(UIName.PlayerInfoPopup, data.uid,PLAYER_INFO_VIEW_TYPE.MIND_DEMON)
|
||||||
|
end)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function this:OnOpen(data)
|
||||||
|
--this.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.ShenZun})
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--添加事件监听(用于子类重写)
|
||||||
|
function this:AddListener()
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
--移除事件监听(用于子类重写)
|
||||||
|
function this:RemoveListener()
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function this.UpdateTopInfo()
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--界面关闭时调用(用于子类重写)
|
||||||
|
function this:OnClose()
|
||||||
|
if self.timer then
|
||||||
|
self.timer:Stop()
|
||||||
|
self.timer = nil
|
||||||
|
end
|
||||||
|
CheckRedPointStatus(RedPointType.KaiFuChongBang)
|
||||||
|
end
|
||||||
|
|
||||||
|
function this:OnDestroy()
|
||||||
|
this.spLoader:Destroy()
|
||||||
|
if self.timer then
|
||||||
|
self.timer:Stop()
|
||||||
|
self.timer = nil
|
||||||
|
end
|
||||||
|
curConfig=nil
|
||||||
|
SubUIManager.Close(this.ScrollView)
|
||||||
|
SubUIManager.Close(this.rankScrollView)
|
||||||
|
end
|
||||||
|
return this
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5c881418ef0d17447baa493e67bd667a
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -109,6 +109,7 @@ function this.ResetLocalData(var)--初始化所有本地的每日一刷--1是五
|
||||||
PlayerPrefs.SetInt(PlayerManager.uid.."monthCard", 0)
|
PlayerPrefs.SetInt(PlayerManager.uid.."monthCard", 0)
|
||||||
PlayerPrefs.SetInt(PlayerManager.uid.."piaomiaozhilv", 0)
|
PlayerPrefs.SetInt(PlayerManager.uid.."piaomiaozhilv", 0)
|
||||||
PlayerPrefs.SetInt(PlayerManager.uid.."CommonActPage"..ActivityTypeDef.YunYouShangRen,0)
|
PlayerPrefs.SetInt(PlayerManager.uid.."CommonActPage"..ActivityTypeDef.YunYouShangRen,0)
|
||||||
|
PlayerPrefs.SetInt(PlayerManager.uid.."kaifuchongbang",0)
|
||||||
end
|
end
|
||||||
|
|
||||||
if var == 1 then
|
if var == 1 then
|
||||||
|
|
|
@ -682,7 +682,7 @@ function this.RegisterRedCheckFunc()
|
||||||
RPData:AddCheckFunc(RedPointType.jijin328,CommonActPageManager.ChaoZhiJiJin328Red)
|
RPData:AddCheckFunc(RedPointType.jijin328,CommonActPageManager.ChaoZhiJiJin328Red)
|
||||||
--战力冲刺
|
--战力冲刺
|
||||||
RPData:AddCheckFunc(RedPointType.PowerRiceGool,CommonActPageManager.PowerRiceRedCheck)
|
RPData:AddCheckFunc(RedPointType.PowerRiceGool,CommonActPageManager.PowerRiceRedCheck)
|
||||||
|
RPData:AddCheckFunc(RedPointType.KaiFuChongBang,CommonActPageManager.ChongBangCheckRed)
|
||||||
RPData:AddCheckFunc(RedPointType.eastSeaFindGod1,CommonActPageManager.GetRedPointEastSeaFindGodnew)
|
RPData:AddCheckFunc(RedPointType.eastSeaFindGod1,CommonActPageManager.GetRedPointEastSeaFindGodnew)
|
||||||
RPData:AddCheckFunc(RedPointType.eastSeaFindGod2,CommonActPageManager.GetRedPointEastSeaFindGodnew)
|
RPData:AddCheckFunc(RedPointType.eastSeaFindGod2,CommonActPageManager.GetRedPointEastSeaFindGodnew)
|
||||||
RPData:AddCheckFunc(RedPointType.eastSeaFindGod3,CommonActPageManager.GetRedPointEastSeaFindGodnew)
|
RPData:AddCheckFunc(RedPointType.eastSeaFindGod3,CommonActPageManager.GetRedPointEastSeaFindGodnew)
|
||||||
|
|
Loading…
Reference in New Issue