Esempio n. 1
0
 /// <summary>
 /// 销毁房间
 /// </summary>
 /// <param name="room"></param>
 public void DestoryRoom(FightRoom room)
 {
     roomIdModleDic.Remove(room.roomId);
     foreach (var player in room.playerList)
     {
         userIdRoomIdDic.Remove(player.userId);
     }
     room.Destory();
     roomQueue.Enqueue(room);
 }
Esempio n. 2
0
 /// <summary>
 /// 销毁房间
 /// </summary>
 /// <param name="room"></param>
 public void DesRoom(FightRoom room)
 {
     roomIdModelDic.Remove(room.roomId);
     // 移除玩家
     foreach (var player in room.playerList)
     {
         userIdRoomIdDic.Remove(player.id);
     }
     // 初始化数据
     room.Destory();
     // 加入重用队列
     roomQueue.Enqueue(room);
 }