예제 #1
0
        /// <summary>
        /// Reads an array of values from a <see cref="BitStream"/>.
        /// </summary>
        /// <param name="bs">The <see cref="BitStream"/> to read from.</param>
        /// <param name="count">The number of values to read.</param>
        /// <returns>The array of read values.</returns>
        public static short[] ReadShorts(this BitStream bs, int count)
        {
            var ret = new short[count];

            for (var i = 0; i < count; i++)
            {
                ret[i] = bs.ReadShort();
            }
            return(ret);
        }
예제 #2
0
 /// <summary>
 /// Reads a 16-bit signed integer.
 /// </summary>
 /// <param name="name">Unused by the <see cref="BinaryValueReader"/>.</param>
 /// <returns>Value read from the reader.</returns>
 public short ReadShort(string name)
 {
     return(_reader.ReadShort());
 }
예제 #3
0
 void RecvSetLevel(IIPSocket conn, BitStream r)
 {
     var level = r.ReadShort();
     UserInfo.Level = level;
 }