--- 检查工具 local CheckTool = {}; --- 检查玩家是否离开 ---@param InFunc fun(TeamIDs:table) function CheckTool:PlayerLeave(InFunc) local PCs = UGCGameSystem.GetAllPlayerController(false); -- 检查有多少个 TeamId local TeamIds = {}; for i, v in pairs(PCs) do local TeamID = UGCPlayerControllerSystem.GetTeamID(v); table.insert(TeamIds, TeamID); end return InFunc(TeamIds); end -- 检查玩家是否存活 function CheckTool:PlayerAlive() local Pawns = UGCGameSystem.GetAllPlayerPawn(); for i, Pawn in pairs(Pawns) do end end return CheckTool;