【首领来袭】提交
parent
df3c0638f4
commit
338ed4d13f
File diff suppressed because it is too large
Load Diff
|
@ -6,6 +6,7 @@ local BossConfig = ConfigManager.GetConfig(ConfigName.MainLevelBossConfig)
|
||||||
local artConfig = ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
|
local artConfig = ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
|
||||||
local bgName
|
local bgName
|
||||||
local Live
|
local Live
|
||||||
|
local orginLayer = 0
|
||||||
|
|
||||||
--初始化组件(用于子类重写)
|
--初始化组件(用于子类重写)
|
||||||
function BattleBossInfoPanel:InitComponent()
|
function BattleBossInfoPanel:InitComponent()
|
||||||
|
@ -23,12 +24,15 @@ function BattleBossInfoPanel:InitComponent()
|
||||||
self.talismanText = Util.GetGameObject(self.gameObject,"content/Detail/talisman/Text"):GetComponent("Text")
|
self.talismanText = Util.GetGameObject(self.gameObject,"content/Detail/talisman/Text"):GetComponent("Text")
|
||||||
self.ani1 = Util.GetGameObject(self.gameObject,"ani")
|
self.ani1 = Util.GetGameObject(self.gameObject,"ani")
|
||||||
self.ani2 = Util.GetGameObject(self.gameObject,"ani2")
|
self.ani2 = Util.GetGameObject(self.gameObject,"ani2")
|
||||||
|
|
||||||
|
self.effect = Util.GetGameObject(self.gameObject,"UI_effect_RecruitPanel_particle")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--绑定事件(用于子类重写)
|
--绑定事件(用于子类重写)
|
||||||
function BattleBossInfoPanel:BindEvent()
|
function BattleBossInfoPanel:BindEvent()
|
||||||
Util.AddClick(self.btnBack,function ()
|
Util.AddClick(self.btnBack,function ()
|
||||||
|
timer1:Stop()
|
||||||
PlayUIAnim(self.ani1)
|
PlayUIAnim(self.ani1)
|
||||||
PlayUIAnim(self.ani2)
|
PlayUIAnim(self.ani2)
|
||||||
Timer.New(function ()
|
Timer.New(function ()
|
||||||
|
@ -46,24 +50,27 @@ function BattleBossInfoPanel:RemoveListener()
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBossInfoPanel:OnSortingOrderChange()
|
function BattleBossInfoPanel:OnSortingOrderChange()
|
||||||
|
Util.AddParticleSortLayer(self.effect, self.sortingOrder - orginLayer)
|
||||||
|
orginLayer = self.sortingOrder
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--界面打开时调用(用于子类重写)
|
--界面打开时调用(用于子类重写)
|
||||||
function BattleBossInfoPanel:OnOpen(...)
|
function BattleBossInfoPanel:OnOpen(...)
|
||||||
func = ...
|
func = ...
|
||||||
|
orginLayer = 0
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 打开,重新打开时回调
|
-- 打开,重新打开时回调
|
||||||
function BattleBossInfoPanel:OnShow()
|
function BattleBossInfoPanel:OnShow()
|
||||||
Timer.New(function ()
|
self.timer1 = Timer.New(function ()
|
||||||
PlayUIAnim(self.ani1)
|
PlayUIAnim(self.ani1)
|
||||||
PlayUIAnim(self.ani2)
|
PlayUIAnim(self.ani2)
|
||||||
Timer.New(function ()
|
Timer.New(function ()
|
||||||
self:ClosePanel()
|
self:ClosePanel()
|
||||||
end,0.7):Start()
|
end,0.7):Start()
|
||||||
end,10):Start()
|
end,10)
|
||||||
|
self.timer1:Start()
|
||||||
local data = ConfigManager.GetConfigData(ConfigName.MainLevelConfig,FightPointPassManager.curOpenFight)
|
local data = ConfigManager.GetConfigData(ConfigName.MainLevelConfig,FightPointPassManager.curOpenFight)
|
||||||
local heroData = ConfigManager.GetConfigData(ConfigName.HeroConfig,data.BossPreview)
|
local heroData = ConfigManager.GetConfigData(ConfigName.HeroConfig,data.BossPreview)
|
||||||
local bossData = ConfigManager.GetConfigDataByKey(ConfigName.MainLevelBossConfig,"HeroId",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.nameOther.gameObject:SetActive(GetcurLanguage ~= 0)
|
||||||
self.posTextOther.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
|
bgName = artConfig[HeroConfig[data.BossPreview].Live].Name
|
||||||
local pos = HeroConfig[data.BossPreview].Position
|
local pos = bossData.Position
|
||||||
local scale = HeroConfig[data.BossPreview].Scale
|
local scale = bossData.Scale
|
||||||
if Live then
|
if Live then
|
||||||
poolManager:UnLoadLive(bgName, Live)
|
poolManager:UnLoadLive(bgName, Live)
|
||||||
end
|
end
|
||||||
|
@ -97,6 +106,10 @@ end
|
||||||
|
|
||||||
--界面关闭时调用(用于子类重写)
|
--界面关闭时调用(用于子类重写)
|
||||||
function BattleBossInfoPanel:OnClose()
|
function BattleBossInfoPanel:OnClose()
|
||||||
|
if self.timer1 then
|
||||||
|
self.timer1:Stop()
|
||||||
|
self.timer1 = nil
|
||||||
|
end
|
||||||
if func then
|
if func then
|
||||||
func()
|
func()
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue