Esempio n. 1
0
 /// <summary>
 /// 返回大厅的功能。
 /// </summary>
 public void BackToHall()
 {
     _dialogManager.ShowConfirmBox(
         "真的要离开牌局吗?",
         true, "退出", () =>
     {
         if (!_appController.IsSingleGameMode())
         {
             var room            = _room.Read();
             var currentRoomType = room == null ? RoomType.Match : room.type;
             if (currentRoomType == RoomType.Normal)
             {
                 // 选桌房,离桌。
                 _remoteAPI.LeaveTable(false);
             }
             else
             {
                 // 其他房间直接离开房间。
                 _remoteAPI.LeaveRoom(false);
             }
         }
         else
         {
             _appController.ExitSingleGame();
         }
     },
         true, "继续游戏", null,
         true, true, true);
 }