2025-01-04 23:00:19 +08:00
|
|
|
|
local Action_PlayerLeave = {
|
|
|
|
|
PlayerKey = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
-- 触发器激活时,将执行Action的Execute
|
|
|
|
|
function Action_PlayerLeave:Execute(...)
|
|
|
|
|
ugcprint(string.format("[Action_PlayerLeave] Start settlement %d", self.PlayerKey));
|
|
|
|
|
local TeamID = UGCPlayerStateSystem.GetTeamID(self.PlayerKey);
|
|
|
|
|
UGCPlayerStateSystem.SavePlayerArchiveData(AccountTable[self.PlayerKey].UID, ArchiveTable[self.PlayerKey]);
|
|
|
|
|
UGCEventSystem.SendEvent(EventTypes.AddPlayer, self.PlayerKey, TeamID, false);
|
|
|
|
|
UGCLogSystem.Log("[Action_PlayerLeave:Execute] 执行结束")
|
|
|
|
|
MiniGameManager:OnPlayerLeave(self.PlayerKey);
|
2025-01-08 22:46:12 +08:00
|
|
|
|
UGCGameSystem.SendPlayerSettlement(self.PlayerKey);
|
2025-01-04 23:00:19 +08:00
|
|
|
|
return true
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
--[[
|
|
|
|
|
-- 需要勾选Action的EnableTick,才会执行Update
|
|
|
|
|
-- 触发器激活后,将在每个tick执行Action的Update,直到self.bEnableActionTick为false
|
|
|
|
|
function Action_PlayerLeave:Update(DeltaSeconds)
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
]]
|
|
|
|
|
|
|
|
|
|
return Action_PlayerLeave;
|