25 lines
519 B
C#
25 lines
519 B
C#
using LiteNetLib.Utils;
|
|
|
|
using Engine.Core;
|
|
|
|
namespace Engine.Systems.Network;
|
|
|
|
internal static class ColorRGBNetPacker
|
|
{
|
|
internal static void Write(NetDataWriter writer, ColorRGB data)
|
|
{
|
|
writer.Put(data.R);
|
|
writer.Put(data.G);
|
|
writer.Put(data.B);
|
|
}
|
|
|
|
internal static ColorRGB Read(NetDataReader reader)
|
|
{
|
|
byte red = reader.GetByte();
|
|
byte green = reader.GetByte();
|
|
byte blue = reader.GetByte();
|
|
|
|
return new ColorRGB(red, green, blue);
|
|
}
|
|
}
|