Files

25 lines
560 B
C#

using LiteNetLib.Utils;
using Engine.Core;
namespace Engine.Systems.Network.Packers;
internal static class ColorHSVNetPacker
{
internal static void Write(NetDataWriter writer, ColorHSV data)
{
writer.Put(data.Hue);
writer.Put(data.Saturation);
writer.Put(data.Value);
}
internal static ColorHSV Read(NetDataReader reader)
{
float hue = reader.GetFloat();
float saturation = reader.GetFloat();
float value = reader.GetFloat();
return new ColorHSV(hue, saturation, value);
}
}