public new bool Play(TileDef def) { if (base.Play(def)) { GameMessage.SendCardReqDef data = new GameMessage.SendCardReqDef(); data.cCard = def.Value; #if USE_MSGPACK3 var serializer = MsgPack.Serialization.MessagePackSerializer.Get <GameMessage.SendCardReqDef>(); byte[] msg = serializer.PackSingleObject(data); _gsProxy.notifyMP(GameMessage.c2s_SendCardReqDef, msg); #else byte[] msg = XConvert.ConvertToByte(data); _gsProxy.notify(GameMessage.c2s_SendCardReqDef, msg); #endif #if UNITY_5 UnityEngine.Debug.Log("SendCardReqDef -> " + data.cCard); UnityEngine.Debug.Log("##########AFTER -> " + ToString()); #endif return(true); } #if UNITY_5 UnityEngine.Debug.Log("SendCardReqDef Error..."); #endif return(false); }
void Start() { GameMessage.SendCardReqDef data = new GameMessage.SendCardReqDef(); data.cCard = 9; byte[] msg = XConvert.ConvertToByte(data); Debug.Log("===============" + msg.Length); }
public void StartAuth(int userid) { GameMessage.SendCardReqDef data = new GameMessage.SendCardReqDef(); data.cCard = 9; byte[] arr = XConvert.ConvertToByte(data); BaseMessage.TestConnect t = new BaseMessage.TestConnect(); t.b1 = 128; byte[] tarr = XConvert.ConvertToByte(t, 0); BaseMessage.AuthenReqDef authenReq = new BaseMessage.AuthenReqDef(); authenReq.iUserID = userid; authenReq.iRoomID = 1; authenReq.cLoginType = BaseMessage.LoginType.USER_LOGIN_THREE; authenReq.szPasswd = STRMD5.MD5Num("000000"); Info.UserId = userid; //byte[] msg = XConvert.ToByte(authenReq); byte[] msg = XConvert.ConvertToByte(authenReq); _gsProxy.notify(BaseMessage.AUTHEN_REQ_MSG, msg); }