Exemple #1
0
 public static void WriteColor32RGBA(this BasePacket stream, Color32 value)
 {
     stream.WriteByte(value.r, 8);
     stream.WriteByte(value.g, 8);
     stream.WriteByte(value.b, 8);
     stream.WriteByte(value.a, 8);
 }
Exemple #2
0
        public static void WriteULongVB(this BasePacket p, ulong v)
        {
            ulong b = 0U;

            do
            {
                b = v & 127U;
                v = v >> 7;

                if (v > 0)
                {
                    b |= 128U;
                }

                p.WriteByte((byte)b);
            } while (v != 0);
        }
Exemple #3
0
        public static void WriteUIntVB(this BasePacket packet, uint v)
        {
            uint b = 0U;

            do
            {
                b = v & 127U;
                v = v >> 7;

                if (v > 0)
                {
                    b |= 128U;
                }

                packet.WriteByte((byte)b);
            } while (v != 0);
        }