战斗剧情播放两边修改

dev_chengFeng
jiaoyangna 2021-04-29 19:44:41 +08:00
parent dd8d7df89f
commit 45eef519df
1 changed files with 13 additions and 5 deletions

View File

@ -89,6 +89,7 @@ function StoryMapPanel:OnOpen(config)
sortingOrder = 0
this.PlayerGrouops = {}
this.triggerEvent = {}
this.callList = Stack.New()
curGroupConfig = config
curGroupId = config.Id
this.LoadMap()
@ -136,6 +137,7 @@ function StoryMapPanel:OnShow()
if not curGroupConfig.TriggerEvent or #curGroupConfig.TriggerEvent < 1 then
return
end
this.triggerEvent = {}
--初始化触发事件
for i = 1,#curGroupConfig.TriggerEvent do
local event = {}
@ -146,7 +148,7 @@ function StoryMapPanel:OnShow()
end
table.insert(this.triggerEvent,event)
end
this.callList = Stack.New()
this.callList:Clear()
for i = #this.triggerEvent,1,-1 do
this.callList:Push(function()
this:CheckTrigger(this.triggerEvent[i])
@ -160,7 +162,6 @@ function this:StackPop()
this.callList:Pop()()
else
sortingOrder = newSortingOrder
this:OnClose()
StoryMapManager.GetSingleStoryConfig()
end
end
@ -405,8 +406,7 @@ function this:CheckTrigger(data,go)
Timer.New(function()
this.UI_Effect_ChuFaEffect_04.gameObject:SetActive(false)
this.UI_Effect_ChuFaEffect_07.gameObject:SetActive(false)
this.btnSkipBtnComp.enabled = true
this.btnSkipBtnComp.enabled = true
this.btnSkipBtnComp.enabled = true
this:StackPop()
end,data.groups[1],1,false):Start()
end
@ -421,7 +421,7 @@ function this:EnterFight()
fightType = 0,
maxRound = 20,
}
UIManager.OpenPanel(UIName.BattlePanel, testFightData, BATTLE_TYPE.Test,function()
UIManager.OpenPanel(UIName.BattlePanel, testFightData, BATTLE_TYPE.Test,function()
this:StackPop()
end)
end
@ -628,6 +628,14 @@ function StoryMapPanel:OnClose()
poolManager:UnLoadAsset("UI_Effect_ChuFaEffect_05", this.UI_Effect_ChuFaEffect_05, PoolManager.AssetType.GameObject)
this.UI_Effect_ChuFaEffect_05 = nil
end
if this.UI_Effect_ChuFaEffect_06 then
poolManager:UnLoadAsset("UI_Effect_ChuFaEffect_06", this.UI_Effect_ChuFaEffect_05, PoolManager.AssetType.GameObject)
this.UI_Effect_ChuFaEffect_06 = nil
end
if this.UI_Effect_ChuFaEffect_07 then
poolManager:UnLoadAsset("UI_Effect_ChuFaEffect_07", this.UI_Effect_ChuFaEffect_05, PoolManager.AssetType.GameObject)
this.UI_Effect_ChuFaEffect_07 = nil
end
end
--界面销毁时调用(用于子类重写)