2025-01-04 23:00:19 +08:00

20 lines
729 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 EventAction_PlayerReSpawn = {
PlayerKey = -1;
DelayTime = 3.
}
-- 触发器激活时将执行Action的Execute
function EventAction_PlayerReSpawn:Execute(...)
local GameStateType = UGCGameSystem.GameState:GetGameStateType()
if UGCGameSystem.IsServer() then
UGCLogSystem.Log("[EventAction_PlayerReSpawn_Execute] PlayerKey:%s", tostring(self.PlayerKey))
UGCEventSystem.SetTimer(UGCGameSystem.GameState, function()
-- if GameStateType == UGCGameSystem.GameState:GetGameStateType() then
UGCGameSystem.GetRespawnComponent():AddRespawnPlayer(self.PlayerKey, 0)
-- end
end, self.DelayTime)
end
return true
end
return EventAction_PlayerReSpawn