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

31 lines
917 B
Lua
Raw Normal View History

2021-04-20 13:58:00 +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
Log(string.format("需要删除的地图点ID%s", 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