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