//检测一个房间是否能开始游戏 public static void DetetionRoomStartGame(this MatchRoomComponent matchRoomComponent, int roomId) { MatchRoom matchRoom = matchRoomComponent.GetRoom(roomId); if (matchRoom != null && !matchRoom.IsGameBeing && matchRoom.DetetionMayStartGame()) { matchRoom.StartGame();//开始游戏 } }