【首领来袭】完成
parent
c2c712c3f9
commit
3ddc796ec2
File diff suppressed because it is too large
Load Diff
|
@ -184,7 +184,8 @@ ConfigName = {
|
||||||
Tips = "TipsConfig",
|
Tips = "TipsConfig",
|
||||||
Hongmeng = "Hongmeng",
|
Hongmeng = "Hongmeng",
|
||||||
HongmengUp = "HongmengUp",
|
HongmengUp = "HongmengUp",
|
||||||
NewHeroConfig = "NewHeroConfig"
|
NewHeroConfig = "NewHeroConfig",
|
||||||
|
MainLevelBossConfig = "MainLevelBoss",
|
||||||
}
|
}
|
||||||
|
|
||||||
require "Framework/GameDataBase"
|
require "Framework/GameDataBase"
|
||||||
|
|
|
@ -1,17 +1,39 @@
|
||||||
require("Base/BasePanel")
|
require("Base/BasePanel")
|
||||||
local BattleBossInfoPanel = Inherit(BasePanel)
|
local BattleBossInfoPanel = Inherit(BasePanel)
|
||||||
local func
|
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()
|
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
|
end
|
||||||
|
|
||||||
|
|
||||||
--绑定事件(用于子类重写)
|
--绑定事件(用于子类重写)
|
||||||
function BattleBossInfoPanel:BindEvent()
|
function BattleBossInfoPanel:BindEvent()
|
||||||
Util.AddClick(self.btnBack,function ()
|
Util.AddClick(self.btnBack,function ()
|
||||||
self:ClosePanel()
|
PlayUIAnim(self.ani1)
|
||||||
|
PlayUIAnim(self.ani2)
|
||||||
|
Timer.New(function ()
|
||||||
|
self:ClosePanel()
|
||||||
|
end,0.7):Start()
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -30,13 +52,46 @@ end
|
||||||
--界面打开时调用(用于子类重写)
|
--界面打开时调用(用于子类重写)
|
||||||
function BattleBossInfoPanel:OnOpen(...)
|
function BattleBossInfoPanel:OnOpen(...)
|
||||||
func = ...
|
func = ...
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 打开,重新打开时回调
|
-- 打开,重新打开时回调
|
||||||
function BattleBossInfoPanel:OnShow()
|
function BattleBossInfoPanel:OnShow()
|
||||||
Timer.New(function ()
|
Timer.New(function ()
|
||||||
self:ClosePanel()
|
PlayUIAnim(self.ani1)
|
||||||
end,5):Start()
|
PlayUIAnim(self.ani2)
|
||||||
|
Timer.New(function ()
|
||||||
|
self:ClosePanel()
|
||||||
|
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
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -45,6 +100,9 @@ function BattleBossInfoPanel:OnClose()
|
||||||
if func then
|
if func then
|
||||||
func()
|
func()
|
||||||
end
|
end
|
||||||
|
if Live then
|
||||||
|
poolManager:UnLoadLive(bgName, Live)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--界面销毁时调用(用于子类重写)
|
--界面销毁时调用(用于子类重写)
|
||||||
|
|
|
@ -555,16 +555,16 @@ function this.BattleOrderChange(order)
|
||||||
BattleLogic.StartTurnRound()
|
BattleLogic.StartTurnRound()
|
||||||
end
|
end
|
||||||
--判断是否需要显示boss信息
|
--判断是否需要显示boss信息
|
||||||
local condition = true
|
local data = ConfigManager.GetConfigData(ConfigName.MainLevelConfig,FightPointPassManager.curOpenFight)
|
||||||
Timer.New(function ()
|
Timer.New(function ()
|
||||||
if condition then
|
if data.BossPreview and data.BossPreview > 0 then
|
||||||
UIManager.OpenPanel(UIName.BattleBossInfoPanel,function ()
|
UIManager.OpenPanel(UIName.BattleBossInfoPanel,function ()
|
||||||
func()
|
func()
|
||||||
end)
|
end)
|
||||||
else
|
else
|
||||||
func()
|
func()
|
||||||
end
|
end
|
||||||
end,2):Start()
|
end,1.5):Start()
|
||||||
end
|
end
|
||||||
|
|
||||||
--刷新敌军站位
|
--刷新敌军站位
|
||||||
|
|
Loading…
Reference in New Issue