Beispiel #1
0
        public static uint ReadUIntVB(this BasePacket packet)
        {
            uint v = 0U;
            uint b = 0U;

            int s = 0;

            do
            {
                b = packet.ReadByte();
                v = v | ((b & 127U) << s);
                s = s + 7;
            } while (b > 127U);

            return(v);
        }
Beispiel #2
0
        public static ulong ReadULongVB(this BasePacket p)
        {
            ulong v = 0U;
            ulong b = 0U;

            int s = 0;

            do
            {
                b = p.ReadByte();
                v = v | ((b & 127U) << s);
                s = s + 7;
            } while (b > 127U);

            return(v);
        }
Beispiel #3
0
 public static Color32 ReadColor32RGB(this BasePacket stream)
 {
     return(new Color32(stream.ReadByte(8), stream.ReadByte(8), stream.ReadByte(8), 0xFF));
 }