28 lines
943 B
Lua
28 lines
943 B
Lua
|
local Action_DefaultEventNotify = {
|
|||
|
EventName = "",
|
|||
|
DsDoOnce = true
|
|||
|
}
|
|||
|
|
|||
|
-- 触发器激活时,将执行Action的Execute
|
|||
|
function Action_DefaultEventNotify:Execute(...)
|
|||
|
local TargetEvent = EventConfig.GameModeEditEventMap[self.EventName]
|
|||
|
if TargetEvent then
|
|||
|
if self.EventName == "DSStartUp" then
|
|||
|
if self.DsDoOnce then
|
|||
|
self.DsDoOnce = false
|
|||
|
UGCEventSystem.SendEvent(TargetEvent, ...)
|
|||
|
UGCLogSystem.Log("[Action_DefaultEventNotify_Execute] DSStartUp Exe")
|
|||
|
end
|
|||
|
else
|
|||
|
UGCEventSystem.SendEvent(TargetEvent, ...)
|
|||
|
end
|
|||
|
UGCLogSystem.LogTree("[Action_DefaultEventNotify_Execute] EventName:" .. self.EventName, table.pack(...))
|
|||
|
else
|
|||
|
UGCLogSystem.LogError("[Action_DefaultEventNotify_Execute] DefaultEventParam[%s] is nil", tostring(self.EventName))
|
|||
|
end
|
|||
|
return true
|
|||
|
end
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return Action_DefaultEventNotify
|