Esempio n. 1
0
        /// <summary>
        /// ulink发送数据
        /// </summary>
        internal static void WriteItem(uLink.BitStream stream, object obj, params object[] codecOptions)
        {
            ItemObjectData _itemObjData = (ItemObjectData)obj;

            stream.Write <int>(_itemObjData.itemId);
            stream.Write <int>(_itemObjData.objId);
            stream.Write <int>(_itemObjData.num);
            stream.Write <int[]>(_itemObjData.properties);
            stream.Write <float[]>(_itemObjData.values);
        }
Esempio n. 2
0
        /// <summary>
        /// ulink接收数据
        /// </summary>
        internal static object ReadItem(uLink.BitStream stream, params object[] codecOptions)
        {
            ItemObjectData _itemObjData = new ItemObjectData();

            _itemObjData.itemId     = stream.Read <int>();
            _itemObjData.objId      = stream.Read <int>();
            _itemObjData.num        = stream.Read <int>();
            _itemObjData.properties = stream.Read <int[]>();
            _itemObjData.values     = stream.Read <float[]>();


            return(_itemObjData);
        }