Exemplo n.º 1
0
        public virtual unsafe void WriteTo(ref byte *Buffer)
        {
            *((ushort *)Buffer) = SideDefServerID;
            Buffer += TypeSizes.SHORT;

            Animation.WriteTo(ref Buffer);

            Buffer[0] = (byte)Action;
            Buffer++;
        }
Exemplo n.º 2
0
        public virtual int WriteTo(byte[] Buffer, int StartIndex = 0)
        {
            int cursor = StartIndex;

            Array.Copy(BitConverter.GetBytes(sideDefServerID), 0, Buffer, cursor, TypeSizes.SHORT);
            cursor += TypeSizes.SHORT;

            cursor += Animation.WriteTo(Buffer, cursor);

            Buffer[cursor] = (byte)Action;
            cursor++;

            return(cursor - StartIndex);
        }