Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ClientGCMsg&lt;BodyType&gt;"/> class.
        /// This is a recieve constructor.
        /// </summary>
        /// <param name="msg">The packet message to build this gc message from.</param>
        public ClientGCMsg(IPacketGCMsg msg)
            : this()
        {
            DebugLog.Assert(!msg.IsProto, "ClientGCMsg", "ClientGCMsg used for proto message!");

            Deserialize(msg.GetData());
        }
Пример #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ClientGCMsgProtobuf&lt;BodyType&gt;"/> class.
        /// This is a recieve constructor.
        /// </summary>
        /// <param name="msg">The packet message to build this gc message from.</param>
        public ClientGCMsgProtobuf(IPacketGCMsg msg)
            : this(msg.MsgType)
        {
            DebugLog.Assert(msg.IsProto, "ClientGCMsgProtobuf", "ClientGCMsgProtobuf used for non-proto message!");

            Deserialize(msg.GetData());
        }