public override int SerializeTo(byte[] arr, int start = 0) { arr[start++] = (byte)PacketType; BinConversion.GetBytes(arr, start, rotation); start += 4; return(start); }
public override int DeserializeFrom(byte[] arr, int start = 0) { BinConversion.GetFloat(arr, start, out speedX); start += 4; BinConversion.GetFloat(arr, start, out speedY); start += 4; return(start); }