【首领来袭】提交

dev_chengFeng
ZhangBiao 2021-02-26 11:03:14 +08:00
parent df3c0638f4
commit 338ed4d13f
2 changed files with 23643 additions and 9 deletions

View File

@ -6,6 +6,7 @@ local BossConfig = ConfigManager.GetConfig(ConfigName.MainLevelBossConfig)
local artConfig = ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
local bgName
local Live
local orginLayer = 0
--初始化组件(用于子类重写)
function BattleBossInfoPanel:InitComponent()
@ -23,12 +24,15 @@ function BattleBossInfoPanel:InitComponent()
self.talismanText = Util.GetGameObject(self.gameObject,"content/Detail/talisman/Text"):GetComponent("Text")
self.ani1 = Util.GetGameObject(self.gameObject,"ani")
self.ani2 = Util.GetGameObject(self.gameObject,"ani2")
self.effect = Util.GetGameObject(self.gameObject,"UI_effect_RecruitPanel_particle")
end
--绑定事件(用于子类重写)
function BattleBossInfoPanel:BindEvent()
Util.AddClick(self.btnBack,function ()
timer1:Stop()
PlayUIAnim(self.ani1)
PlayUIAnim(self.ani2)
Timer.New(function ()
@ -46,24 +50,27 @@ function BattleBossInfoPanel:RemoveListener()
end
function BattleBossInfoPanel:OnSortingOrderChange()
Util.AddParticleSortLayer(self.effect, self.sortingOrder - orginLayer)
orginLayer = self.sortingOrder
end
--界面打开时调用(用于子类重写)
function BattleBossInfoPanel:OnOpen(...)
func = ...
orginLayer = 0
end
-- 打开,重新打开时回调
function BattleBossInfoPanel:OnShow()
Timer.New(function ()
self.timer1 = Timer.New(function ()
PlayUIAnim(self.ani1)
PlayUIAnim(self.ani2)
Timer.New(function ()
self:ClosePanel()
end,0.7):Start()
end,10):Start()
end,10)
self.timer1:Start()
local data = ConfigManager.GetConfigData(ConfigName.MainLevelConfig,FightPointPassManager.curOpenFight)
local heroData = ConfigManager.GetConfigData(ConfigName.HeroConfig,data.BossPreview)
local bossData = ConfigManager.GetConfigDataByKey(ConfigName.MainLevelBossConfig,"HeroId",data.BossPreview)
@ -79,11 +86,13 @@ function BattleBossInfoPanel:OnShow()
self.nameOther.gameObject:SetActive(GetcurLanguage ~= 0)
self.posTextOther.gameObject:SetActive(GetcurLanguage ~= 0)
--Root
self.posImg.sprite = Util.LoadSprite(GetHeroPosStr(heroData.Profession))
self.posImgDi.sprite = Util.LoadSprite(GetHeroPosBgStr(heroData.Profession))
--Root
bgName = artConfig[HeroConfig[data.BossPreview].Live].Name
local pos = HeroConfig[data.BossPreview].Position
local scale = HeroConfig[data.BossPreview].Scale
local pos = bossData.Position
local scale = bossData.Scale
if Live then
poolManager:UnLoadLive(bgName, Live)
end
@ -97,6 +106,10 @@ end
--界面关闭时调用(用于子类重写)
function BattleBossInfoPanel:OnClose()
if self.timer1 then
self.timer1:Stop()
self.timer1 = nil
end
if func then
func()
end