fix: added missing types for new primitives
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using LiteNetLib.Utils;
|
||||
|
||||
using Engine.Core;
|
||||
|
||||
namespace Engine.Systems.Network;
|
||||
|
||||
internal static class ColorHSVANetPacker
|
||||
{
|
||||
internal static void Write(NetDataWriter writer, ColorHSVA data)
|
||||
{
|
||||
writer.Put(data.Hue);
|
||||
writer.Put(data.Saturation);
|
||||
writer.Put(data.Value);
|
||||
writer.Put(data.Alpha);
|
||||
}
|
||||
|
||||
internal static ColorHSVA Read(NetDataReader reader)
|
||||
{
|
||||
float hue = reader.GetFloat();
|
||||
float saturation = reader.GetFloat();
|
||||
float value = reader.GetFloat();
|
||||
float alpha = reader.GetFloat();
|
||||
|
||||
return new ColorHSVA(hue, saturation, value, alpha);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user