UGCProjects/BreakThrough/Script/gamemode/Action_DefaultEventNotify.lua

28 lines
1012 B
Lua
Raw Normal View History

2025-01-04 23:00:19 +08:00
local Action_DefaultEventNotify = {
EventName = "",
}
-- 触发器激活时将执行Action的Execute
function Action_DefaultEventNotify:Execute(...)
local TargetEvent = EventConfig.GameModeEditEventMap[self.EventName]
if TargetEvent then
UGCLogSystem.LogTree("[Action_DefaultEventNotify_Execute] EventName:" .. self.EventName, table.pack(...))
if self.EventName == "DSStartUp" then
if GlobalConfigs.DsDoOnce then
GlobalConfigs.DsDoOnce = false
UGCEventSystem.SendEvent(TargetEvent, ...)
UGCLogSystem.Log("[Action_DefaultEventNotify_Execute] DSStartUp Exe")
end
else
UGCEventSystem.SendEvent(TargetEvent, ...)
end
UGCLogSystem.Log("[Action_DefaultEventNotify_Execute] Finish")
else
UGCLogSystem.LogError("[Action_DefaultEventNotify_Execute] DefaultEventParam[%s] is nil", tostring(self.EventName))
end
return true
end
return Action_DefaultEventNotify