local Action_PlayerKilled = { KillerKey = 0, --杀手Key PlayerKey = 0, --被杀死玩家Key } function Action_PlayerKilled:Execute(...) local PlayerState = UGCGameSystem.GetPlayerStateByPlayerKey(self.PlayerKey) if UGCGameSystem.GameState and PlayerState then UE.Log("[Action_PlayerKilled:Execute] PlayerName = "..PlayerState.PlayerName) local PlayerData = UGCGameSystem.GameState.PlayerDataList[self.PlayerKey] if PlayerData ~= nil then PlayerData.IsDead = true end local RespawnComponent = UGCGameSystem.GetRespawnComponent() RespawnComponent:AddRespawnPlayerWithTime(self.PlayerKey, 5.0) end return true end return Action_PlayerKilled