parent
873c660b04
commit
3eafd78777
|
@ -61,6 +61,7 @@ local fightAnim = {
|
||||||
--初始化组件(用于子类重写)
|
--初始化组件(用于子类重写)
|
||||||
function FightPointPassMainPanel:InitComponent()
|
function FightPointPassMainPanel:InitComponent()
|
||||||
this.battleSceneLogicGameObject, this.battleSceneGameObject = BattleManager.CreateBattleScene(nil, nil) --创建战场Prefab
|
this.battleSceneLogicGameObject, this.battleSceneGameObject = BattleManager.CreateBattleScene(nil, nil) --创建战场Prefab
|
||||||
|
|
||||||
--local battleCamera = Util.GetGameObject(self.battleSceneGameObject, "CameraRoot/CameraPos/Camera"):GetComponent(
|
--local battleCamera = Util.GetGameObject(self.battleSceneGameObject, "CameraRoot/CameraPos/Camera"):GetComponent(
|
||||||
--"Camera")
|
--"Camera")
|
||||||
--local canvas = self.battleSceneLogicGameObject:GetComponent("Canvas")
|
--local canvas = self.battleSceneLogicGameObject:GetComponent("Canvas")
|
||||||
|
@ -434,7 +435,7 @@ function FightPointPassMainPanel:AddListener()
|
||||||
Game.GlobalEvent:AddEvent(GameEvent.Player.OnPlayerLvChange, this.RefreshOpenTips)
|
Game.GlobalEvent:AddEvent(GameEvent.Player.OnPlayerLvChange, this.RefreshOpenTips)
|
||||||
Game.GlobalEvent:AddEvent(GameEvent.DynamicTask.OnMissionChange, this.refreshVipTask)
|
Game.GlobalEvent:AddEvent(GameEvent.DynamicTask.OnMissionChange, this.refreshVipTask)
|
||||||
Game.GlobalEvent:AddEvent(GameEvent.JumpServerHeightLadder.UpdateWordLv, this.UpdateWordLv)
|
Game.GlobalEvent:AddEvent(GameEvent.JumpServerHeightLadder.UpdateWordLv, this.UpdateWordLv)
|
||||||
|
Game.GlobalEvent:AddEvent(GameEvent.Mission.OnOpenFight, this.OnShow)
|
||||||
Game.GlobalEvent:AddEvent(GameEvent.UI.OnOpen, this.OnUIOpen)
|
Game.GlobalEvent:AddEvent(GameEvent.UI.OnOpen, this.OnUIOpen)
|
||||||
Game.GlobalEvent:AddEvent(GameEvent.Guide.FuncGuideDone, this.OnFuncGuideDone)
|
Game.GlobalEvent:AddEvent(GameEvent.Guide.FuncGuideDone, this.OnFuncGuideDone)
|
||||||
end
|
end
|
||||||
|
@ -452,7 +453,7 @@ function FightPointPassMainPanel:RemoveListener()
|
||||||
Game.GlobalEvent:RemoveEvent(GameEvent.Player.OnPlayerLvChange, this.RefreshOpenTips)
|
Game.GlobalEvent:RemoveEvent(GameEvent.Player.OnPlayerLvChange, this.RefreshOpenTips)
|
||||||
Game.GlobalEvent:RemoveEvent(GameEvent.DynamicTask.OnMissionChange, this.refreshVipTask)
|
Game.GlobalEvent:RemoveEvent(GameEvent.DynamicTask.OnMissionChange, this.refreshVipTask)
|
||||||
Game.GlobalEvent:RemoveEvent(GameEvent.JumpServerHeightLadder.UpdateWordLv, this.UpdateWordLv)
|
Game.GlobalEvent:RemoveEvent(GameEvent.JumpServerHeightLadder.UpdateWordLv, this.UpdateWordLv)
|
||||||
|
Game.GlobalEvent:RemoveEvent(GameEvent.Mission.OnOpenFight, this.OnShow)
|
||||||
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, this.OnUIOpen)
|
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, this.OnUIOpen)
|
||||||
Game.GlobalEvent:RemoveEvent(GameEvent.Guide.FuncGuideDone, this.OnFuncGuideDone)
|
Game.GlobalEvent:RemoveEvent(GameEvent.Guide.FuncGuideDone, this.OnFuncGuideDone)
|
||||||
end
|
end
|
||||||
|
@ -525,7 +526,10 @@ function FightPointPassMainPanel:OnShow()
|
||||||
SoundManager.PlayMusic(SoundConfig.BGM_Main)
|
SoundManager.PlayMusic(SoundConfig.BGM_Main)
|
||||||
-- 调用onshow
|
-- 调用onshow
|
||||||
invadeMonster:OnShow()
|
invadeMonster:OnShow()
|
||||||
|
-- 奖励预览
|
||||||
|
this.IntiReward()
|
||||||
|
-- 刷新关卡按钮状态
|
||||||
|
this.SetFightBtnText()
|
||||||
local curName = GetLanguageStrById(fightLevelConfig[curFightId].Name)
|
local curName = GetLanguageStrById(fightLevelConfig[curFightId].Name)
|
||||||
local curDifficulty = fightLevelConfig[curFightId].Difficulty
|
local curDifficulty = fightLevelConfig[curFightId].Difficulty
|
||||||
local chapterId = 0
|
local chapterId = 0
|
||||||
|
@ -543,10 +547,7 @@ function FightPointPassMainPanel:OnShow()
|
||||||
end
|
end
|
||||||
this.chapterName.text = GetLanguageStrById(fightLevelSetConfig[chapterId].Name)
|
this.chapterName.text = GetLanguageStrById(fightLevelSetConfig[chapterId].Name)
|
||||||
|
|
||||||
-- 奖励预览
|
|
||||||
this.IntiReward()
|
|
||||||
-- 刷新关卡按钮状态
|
|
||||||
this.SetFightBtnText()
|
|
||||||
|
|
||||||
local loadMapName = fightLevelConfig[FightPointPassManager.curOpenFight].BG
|
local loadMapName = fightLevelConfig[FightPointPassManager.curOpenFight].BG
|
||||||
LogError("@@@@@@"..loadMapName)
|
LogError("@@@@@@"..loadMapName)
|
||||||
|
|
Loading…
Reference in New Issue