战斗剧情播放两边修改

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 sortingOrder = 0
this.PlayerGrouops = {} this.PlayerGrouops = {}
this.triggerEvent = {} this.triggerEvent = {}
this.callList = Stack.New()
curGroupConfig = config curGroupConfig = config
curGroupId = config.Id curGroupId = config.Id
this.LoadMap() this.LoadMap()
@ -136,6 +137,7 @@ function StoryMapPanel:OnShow()
if not curGroupConfig.TriggerEvent or #curGroupConfig.TriggerEvent < 1 then if not curGroupConfig.TriggerEvent or #curGroupConfig.TriggerEvent < 1 then
return return
end end
this.triggerEvent = {}
--初始化触发事件 --初始化触发事件
for i = 1,#curGroupConfig.TriggerEvent do for i = 1,#curGroupConfig.TriggerEvent do
local event = {} local event = {}
@ -146,7 +148,7 @@ function StoryMapPanel:OnShow()
end end
table.insert(this.triggerEvent,event) table.insert(this.triggerEvent,event)
end end
this.callList = Stack.New() this.callList:Clear()
for i = #this.triggerEvent,1,-1 do for i = #this.triggerEvent,1,-1 do
this.callList:Push(function() this.callList:Push(function()
this:CheckTrigger(this.triggerEvent[i]) this:CheckTrigger(this.triggerEvent[i])
@ -160,7 +162,6 @@ function this:StackPop()
this.callList:Pop()() this.callList:Pop()()
else else
sortingOrder = newSortingOrder sortingOrder = newSortingOrder
this:OnClose()
StoryMapManager.GetSingleStoryConfig() StoryMapManager.GetSingleStoryConfig()
end end
end end
@ -406,7 +407,6 @@ function this:CheckTrigger(data,go)
this.UI_Effect_ChuFaEffect_04.gameObject:SetActive(false) this.UI_Effect_ChuFaEffect_04.gameObject:SetActive(false)
this.UI_Effect_ChuFaEffect_07.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() this:StackPop()
end,data.groups[1],1,false):Start() end,data.groups[1],1,false):Start()
end end
@ -628,6 +628,14 @@ function StoryMapPanel:OnClose()
poolManager:UnLoadAsset("UI_Effect_ChuFaEffect_05", this.UI_Effect_ChuFaEffect_05, PoolManager.AssetType.GameObject) poolManager:UnLoadAsset("UI_Effect_ChuFaEffect_05", this.UI_Effect_ChuFaEffect_05, PoolManager.AssetType.GameObject)
this.UI_Effect_ChuFaEffect_05 = nil this.UI_Effect_ChuFaEffect_05 = nil
end 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 end
--界面销毁时调用(用于子类重写) --界面销毁时调用(用于子类重写)