Exemple #1
0
    /// <summary>
    /// 加入房间
    /// </summary>
    /// <param name="successAction"></param>
    /// <param name="failedAction"></param>
    /// <param name="roomID"></param>
    private static void EntranceRoom(Action <SCEntranceRoom, guessState> successAction, Action failedAction, int roomID = -1)
    {
        CSEntranceRoom cSEntranceRoom = new CSEntranceRoom();

        if (roomID != -1)
        {
            cSEntranceRoom.RoomId = roomID;
        }

        //模拟测试数据
        Debug.Log("获取当前下注时间成功");

        ProtocalManager.Instance().SendCSEntranceRoom(cSEntranceRoom, (SCEntranceRoom sCEntranceRoom) =>
        {
            //sCEntranceRoom.ActivityInfo.GameStates;

            Debug.Log(sCEntranceRoom.ActivityInfo.GameStates);

            Debug.Log("通知服务器加入房间成功!");
            successAction?.Invoke(sCEntranceRoom, guessState.bottompour);
        },
                                                      (ErrorInfo er) =>
        {
            Debug.Log("通知服务器加入房间失败!Error:" + er.ErrorMessage);
            failedAction?.Invoke();
        });
    }
Exemple #2
0
        public void SendCSEntranceRoom(CSEntranceRoom csentranceroom, Action <SCEntranceRoom> ResponseSCEntranceRoomCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSEntranceRoom> ();

            ProtoSendMethod.BusinessRequest <SCEntranceRoom>(csentranceroom, opCodeType, ResponseSCEntranceRoomCallBack, errorCallBack, isShowDefaultTip);
        }