【首领来袭】战斗报错修复
parent
1b06ae40c9
commit
49701bcbec
|
|
@ -406,7 +406,7 @@ function this.ClearBattleEvent()
|
|||
end
|
||||
|
||||
--敌军出现的表现
|
||||
function this.EnemyAppear()
|
||||
function this.EnemyAppear(isStart)
|
||||
SoundManager.PlaySound(SoundConfig.Sound_BattleStart_03)
|
||||
local go = this.FirstEffect
|
||||
go:SetActive(true)
|
||||
|
|
@ -437,14 +437,15 @@ function this.EnemyAppear()
|
|||
enemyHP = 0
|
||||
this.EnemyHPTxt.text = Language[10231]..math.floor(enemyHP / enemyMaxHP * 100).."%"
|
||||
|
||||
|
||||
Timer.New(function ()
|
||||
if BattleLogic.CurOrder == 1 then
|
||||
BattleManager.StartBattle()
|
||||
else
|
||||
BattleManager.ResumeBattle()
|
||||
end
|
||||
end, 0.1):Start()
|
||||
if isStart then
|
||||
Timer.New(function ()
|
||||
if BattleLogic.CurOrder == 1 then
|
||||
BattleManager.StartBattle()
|
||||
else
|
||||
BattleManager.ResumeBattle()
|
||||
end
|
||||
end, 0.1):Start()
|
||||
end
|
||||
|
||||
if BattleLogic.CurOrder == 1 then
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Guide.GuideBattleStart)
|
||||
|
|
@ -536,7 +537,7 @@ function this.BattleOrderChange(order)
|
|||
end
|
||||
|
||||
PlayUIAnim(this.gameObject)
|
||||
this.EnemyAppear()
|
||||
this.EnemyAppear(true)
|
||||
end)
|
||||
else
|
||||
this.UpRoot:SetActive(false)
|
||||
|
|
@ -548,7 +549,7 @@ function this.BattleOrderChange(order)
|
|||
playerMaxHP = 0
|
||||
this.PlayerPanel:SetActive(true)
|
||||
PlayUIAnim(this.PlayerPanel)
|
||||
this.EnemyAppear()--设置敌人
|
||||
|
||||
BattleLogic.InitOrder()--初始显示双方英雄
|
||||
|
||||
local func = function ()--显示英雄信息后的战斗逻辑
|
||||
|
|
@ -562,15 +563,19 @@ function this.BattleOrderChange(order)
|
|||
--判断是否需要显示boss信息
|
||||
local data = ConfigManager.GetConfigData(ConfigName.MainLevelConfig,FightPointPassManager.curOpenFight)
|
||||
local key = PlayerPrefs.GetInt(PlayerManager.uid.."BattleBossShow"..FightPointPassManager.curOpenFight)
|
||||
Timer.New(function ()
|
||||
if this.fightType == BATTLE_TYPE.STORY_FIGHT and data.BossPreview and data.BossPreview > 0 and key == 0 then
|
||||
if this.fightType == BATTLE_TYPE.STORY_FIGHT and data.BossPreview and data.BossPreview > 0 and key == 0 then
|
||||
|
||||
this.EnemyAppear(false)--设置敌人
|
||||
Timer.New(function ()
|
||||
UIManager.OpenPanel(UIName.BattleBossInfoPanel,function ()
|
||||
func()
|
||||
end)
|
||||
else
|
||||
func()
|
||||
end
|
||||
end,1.5):Start()
|
||||
end,1.5):Start()
|
||||
else
|
||||
this.EnemyAppear(true)--设置敌人
|
||||
func()
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--刷新敌军站位
|
||||
|
|
@ -715,6 +720,7 @@ function this.OnUpdate()
|
|||
end
|
||||
end
|
||||
if BattleManager.IsBattlePlaying() and not BattleLogic.IsEnd then
|
||||
LogGreen("BattleLogic.Update")
|
||||
BattleLogic.Update()
|
||||
-- 再检测一次战斗结束
|
||||
if BattleLogic.IsEnd then return end
|
||||
|
|
|
|||
Loading…
Reference in New Issue