【首领来袭】完成
parent
c2c712c3f9
commit
3ddc796ec2
File diff suppressed because it is too large
Load Diff
|
@ -184,7 +184,8 @@ ConfigName = {
|
|||
Tips = "TipsConfig",
|
||||
Hongmeng = "Hongmeng",
|
||||
HongmengUp = "HongmengUp",
|
||||
NewHeroConfig = "NewHeroConfig"
|
||||
NewHeroConfig = "NewHeroConfig",
|
||||
MainLevelBossConfig = "MainLevelBoss",
|
||||
}
|
||||
|
||||
require "Framework/GameDataBase"
|
||||
|
|
|
@ -1,17 +1,39 @@
|
|||
require("Base/BasePanel")
|
||||
local BattleBossInfoPanel = Inherit(BasePanel)
|
||||
local func
|
||||
local HeroConfig = ConfigManager.GetConfig(ConfigName.HeroConfig)
|
||||
local BossConfig = ConfigManager.GetConfig(ConfigName.MainLevelBossConfig)
|
||||
local artConfig = ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
|
||||
local bgName
|
||||
local Live
|
||||
|
||||
--初始化组件(用于子类重写)
|
||||
function BattleBossInfoPanel:InitComponent()
|
||||
self.btnBack = Util.GetGameObject(self.gameObject,"maskImage")
|
||||
self.btnBack = Util.GetGameObject(self.gameObject,"mask")
|
||||
self.root = Util.GetGameObject(self.gameObject,"root")
|
||||
self.nameImg = Util.GetGameObject(self.gameObject,"content/Pos/NameImg"):GetComponent("Image")
|
||||
self.nameZh = Util.GetGameObject(self.gameObject,"content/Pos/NameZh"):GetComponent("Text")
|
||||
self.nameOther = Util.GetGameObject(self.gameObject,"content/Pos/NameOther"):GetComponent("Text")
|
||||
self.posImg = Util.GetGameObject(self.gameObject,"content/Pos/PosImage"):GetComponent("Image")
|
||||
self.posImgDi = Util.GetGameObject(self.gameObject,"content/Pos/PosImgDi"):GetComponent("Image")
|
||||
self.posTextZh = Util.GetGameObject(self.gameObject,"content/Pos/PosTextZh"):GetComponent("Text")
|
||||
self.posTextOther = Util.GetGameObject(self.gameObject,"content/Pos/PosTexOther"):GetComponent("Text")
|
||||
|
||||
self.skillText = Util.GetGameObject(self.gameObject,"content/Detail/skill/Text"):GetComponent("Text")
|
||||
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")
|
||||
end
|
||||
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
function BattleBossInfoPanel:BindEvent()
|
||||
Util.AddClick(self.btnBack,function ()
|
||||
PlayUIAnim(self.ani1)
|
||||
PlayUIAnim(self.ani2)
|
||||
Timer.New(function ()
|
||||
self:ClosePanel()
|
||||
end,0.7):Start()
|
||||
end)
|
||||
end
|
||||
|
||||
|
@ -30,13 +52,46 @@ end
|
|||
--界面打开时调用(用于子类重写)
|
||||
function BattleBossInfoPanel:OnOpen(...)
|
||||
func = ...
|
||||
|
||||
end
|
||||
|
||||
-- 打开,重新打开时回调
|
||||
function BattleBossInfoPanel:OnShow()
|
||||
Timer.New(function ()
|
||||
PlayUIAnim(self.ani1)
|
||||
PlayUIAnim(self.ani2)
|
||||
Timer.New(function ()
|
||||
self:ClosePanel()
|
||||
end,5):Start()
|
||||
end,0.7):Start()
|
||||
end,10):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)
|
||||
--Pos
|
||||
local GetcurLanguage = 0
|
||||
self.nameZh.text = heroData.ReadingName
|
||||
self.posTextZh.text = heroData.HeroLocation
|
||||
self.nameOther.text = heroData.ReadingName
|
||||
self.posTextOther.text = heroData.ShowHeroLocation
|
||||
|
||||
self.nameZh.gameObject:SetActive(GetcurLanguage == 0)
|
||||
self.posTextZh.gameObject:SetActive(GetcurLanguage == 0)
|
||||
self.nameOther.gameObject:SetActive(GetcurLanguage ~= 0)
|
||||
self.posTextOther.gameObject:SetActive(GetcurLanguage ~= 0)
|
||||
|
||||
--Root
|
||||
|
||||
bgName = artConfig[HeroConfig[data.BossPreview].Live].Name
|
||||
local pos = HeroConfig[data.BossPreview].Position
|
||||
local scale = HeroConfig[data.BossPreview].Scale
|
||||
if Live then
|
||||
poolManager:UnLoadLive(bgName, Live)
|
||||
end
|
||||
Live = poolManager:LoadLive(bgName, self.root.transform, Vector3.one*scale, Vector2.New(pos[1],pos[2]))
|
||||
|
||||
--Bottom
|
||||
self.skillText.text = bossData.Skilltips
|
||||
self.talismanText.text = bossData.Treasuretips
|
||||
end
|
||||
|
||||
|
||||
|
@ -45,6 +100,9 @@ function BattleBossInfoPanel:OnClose()
|
|||
if func then
|
||||
func()
|
||||
end
|
||||
if Live then
|
||||
poolManager:UnLoadLive(bgName, Live)
|
||||
end
|
||||
end
|
||||
|
||||
--界面销毁时调用(用于子类重写)
|
||||
|
|
|
@ -555,16 +555,16 @@ function this.BattleOrderChange(order)
|
|||
BattleLogic.StartTurnRound()
|
||||
end
|
||||
--判断是否需要显示boss信息
|
||||
local condition = true
|
||||
local data = ConfigManager.GetConfigData(ConfigName.MainLevelConfig,FightPointPassManager.curOpenFight)
|
||||
Timer.New(function ()
|
||||
if condition then
|
||||
if data.BossPreview and data.BossPreview > 0 then
|
||||
UIManager.OpenPanel(UIName.BattleBossInfoPanel,function ()
|
||||
func()
|
||||
end)
|
||||
else
|
||||
func()
|
||||
end
|
||||
end,2):Start()
|
||||
end,1.5):Start()
|
||||
end
|
||||
|
||||
--刷新敌军站位
|
||||
|
|
Loading…
Reference in New Issue