Example #1
0
 public void Update()
 {
     if (serverEvent.Count > 0)
     {
         MessageXieYi xieyi = serverEvent.Dequeue();
         if ((MessageConvention)xieyi.XieYiFirstFlag == MessageConvention.createRoom ||
             (MessageConvention)xieyi.XieYiFirstFlag == MessageConvention.joinRoom)
         {
             JoinRoom joinInfo = new JoinRoom();
             joinInfo = SerializeHelper.Deserialize <JoinRoom>(xieyi.MessageContent);
             ErrorType error = joinInfo.error;
             if (error != ErrorType.none)
             {
                 UIManager.instance.ShowAlertTip("加入房间失败" + error);
             }
             else
             {
                 //GameManager.GetRoomInfo();
             }
         }
         if ((MessageConvention)xieyi.XieYiFirstFlag == MessageConvention.getRoomInfo)
         {
             RoomUI.Show();
             CreateRoomUI.Close();
         }
         if ((MessageConvention)xieyi.XieYiFirstFlag == MessageConvention.updateRoom)
         {
             ErrorType error = ClassGroup.CheckIsError(xieyi);
             if (error != ErrorType.none)
             {
                 UIManager.instance.ShowAlertTip("更新房间失败:" + error);
             }
             else
             {
                 UIManager.instance.ShowAlertTip("更新房间成功");
             }
             Close();
         }
     }
 }
Example #2
0
 private void Awake()
 {
     instance = this;
     //
     SocketManager.ListenDelegate(true, messageHandle, OperationListenInfo);
 }
Example #3
0
 public void OnClickSelectModel()
 {
     CreateRoomUI.Show(RoomControl.创建房间, GameModel.组队模式);
 }
Example #4
0
 public void OnClickSetting()
 {
     CreateRoomUI.Show(RoomControl.修改房间, DataController.instance.MyRoomInfo.RoomType);
 }