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

31 lines
902 B
Lua
Raw Normal View History

2020-08-06 17:52:32 +08:00
--- 删除事件点
2020-05-09 13:31:21 +08:00
local BHDeletePoint = {}
local this = BHDeletePoint
function this.Excute(arg, func)
local pos = arg.pos
if not pos then
for i = 1, #arg.pointID do
local pointID = arg.pointID[i]
if pointID then
for i, v in pairs(MapManager.mapPointList) do
if v == pointID then
Game.GlobalEvent:DispatchEvent(GameEvent.Map.PointRemove, i)
end
end
2020-06-23 18:36:24 +08:00
Log(string.format(Language[11393], pointID))
2020-05-09 13:31:21 +08:00
end
end
else
Game.GlobalEvent:DispatchEvent(GameEvent.Map.PointRemove, pos)
end
--if not pos then
-- Log("删除事件点错误,无法获得要删除的事件点")
-- return
--end
--Game.GlobalEvent:DispatchEvent(GameEvent.Map.PointRemove, pos)
if func then func() end
end
2020-06-23 18:36:24 +08:00
return this