miduo_client/Assets/ManagedResources/~Lua/Modules/Mission/Behaviour/BHMapProgressChange.lua

27 lines
915 B
Lua
Raw Normal View History

2020-08-25 15:46:38 +08:00
--- 消耗物品
2020-05-09 13:31:21 +08:00
local BHMapProgressChange = {}
local this = BHMapProgressChange
function this.Excute(arg, func)
local type = arg.type
local curEventID = arg.curEventID
local monsterID = arg.monsterID
--对话界面打开的话,先关闭再抛事件
if UIManager.IsOpen(UIName.MapOptionPanel) then
local triggerCallBack
triggerCallBack = function (panelType, panel)
if panelType == UIName.MapOptionPanel then
Game.GlobalEvent:DispatchEvent(GameEvent.Map.ProgressChange, type, curEventID, monsterID)
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnClose, triggerCallBack)
end
end
Game.GlobalEvent:AddEvent(GameEvent.UI.OnClose, triggerCallBack)
else
Game.GlobalEvent:DispatchEvent(GameEvent.Map.ProgressChange, type, curEventID, monsterID)
end
if func then func() end
end
2020-06-23 18:36:24 +08:00
return this