【车迟斗法】boss轮转
parent
97970275e1
commit
a064d83bf7
|
@ -16,7 +16,6 @@ local _TabFontColor = { default = Color.New(130 / 255, 128 / 255, 120 / 255, 1),
|
|||
this.timer = Timer.New()
|
||||
local challengeNum = 0
|
||||
local lootNum = 0
|
||||
local bossNum = 0
|
||||
--初始化组件(用于子类重写)
|
||||
function GuildCarDelayMainPanel:InitComponent()
|
||||
this.live2dRoot = Util.GetGameObject(self.gameObject, "live2dRoot")
|
||||
|
@ -54,12 +53,6 @@ function GuildCarDelayMainPanel:InitComponent()
|
|||
this.RankListPre, nil, Vector2.New(-v2.x*2, -v2.y*2), 1, 1, Vector2.New(50,8))
|
||||
this.ScrollView.moveTween.MomentumAmount = 1
|
||||
this.ScrollView.moveTween.Strength = 1
|
||||
|
||||
for i, v in ConfigPairs(ConfigManager.GetConfig(ConfigName.WorldBossConfig)) do
|
||||
if v.Id > 0 then
|
||||
bossNum = bossNum + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
|
@ -186,9 +179,7 @@ end
|
|||
function this.ShowTitleAllData()
|
||||
curMonsterId = GuildCarDelayManager.bossIndexId
|
||||
curMonsterIdConFig = ConfigManager.GetConfigData(ConfigName.WorldBossConfig,curMonsterId)
|
||||
--获取上一个boss数据
|
||||
local lastMonsterId,lastMonsterIdConFig = this.GetLastBoss(curMonsterId)
|
||||
Log("curMonsterId:"..curMonsterIdConFig.Boss.." lastMonsterId:"..lastMonsterIdConFig.Boss)
|
||||
Log("curMonsterId:"..curMonsterIdConFig.Boss)
|
||||
this.name.text = heroConfig[curMonsterIdConFig.Boss].ReadingName
|
||||
this.proImage.sprite=Util.LoadSprite(GetProStrImageByProNum(heroConfig[curMonsterIdConFig.Boss].PropertyName))
|
||||
curProgress = GuildCarDelayManager.progress
|
||||
|
@ -227,8 +218,7 @@ function this.ShowTitleAllData()
|
|||
this.RemainTimeDown(this.timeTextGo,this.timeText,this.timeNumText,GuildCarDelayManager.endTime - GetTimeStamp(),timeText)
|
||||
end
|
||||
if testLiveGO then
|
||||
poolManager:UnLoadLive(GetResourcePath(heroConfig[lastMonsterIdConFig.Boss].Live), testLiveGO)
|
||||
poolManager:UnLoadLive(GetResourcePath(heroConfig[curMonsterIdConFig.Boss].Live), testLiveGO)
|
||||
GameObject.DestroyImmediate(testLiveGO)
|
||||
end
|
||||
local pos = heroConfig[curMonsterIdConFig.Boss].Position
|
||||
testLiveGO = poolManager:LoadLive(GetResourcePath(heroConfig[curMonsterIdConFig.Boss].Live), this.live2dRoot.transform, Vector3.one*heroConfig[curMonsterIdConFig.Boss].Scale, Vector3.New(pos[1], pos[2], 0))
|
||||
|
@ -241,17 +231,6 @@ function this.ShowTitleAllData()
|
|||
this.RefrePanelRedPoint()
|
||||
end
|
||||
|
||||
function this.GetLastBoss(curBossId)
|
||||
local lastIndex = 0
|
||||
if curBossId == 1 then
|
||||
lastIndex = bossNum
|
||||
else
|
||||
lastIndex = curBossId - 1
|
||||
end
|
||||
local lastMonsterIdConFig = ConfigManager.GetConfigData(ConfigName.WorldBossConfig,lastIndex)
|
||||
return lastMonsterIdConFig.Boss,lastMonsterIdConFig
|
||||
end
|
||||
|
||||
-- tab节点显示自定义
|
||||
function this.TabAdapter(tab, index, status)
|
||||
local tabLab = Util.GetGameObject(tab, "Text")
|
||||
|
|
Loading…
Reference in New Issue