UGCProjects/Counterattack/Script/gamemode/Action_DefaultEventNotify.lua
2025-01-04 23:00:19 +08:00

27 lines
941 B
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

local Action_DefaultEventNotify = {
EventName = "",
}
-- 触发器激活时将执行Action的Execute
function Action_DefaultEventNotify:Execute(...)
local TargetEvent = EventConfig.GameModeEditEventMap[self.EventName]
if TargetEvent then
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.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