feat: added LiteNetLib networking integration
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using LiteNetLib.Utils;
|
||||
|
||||
using Syntriax.Engine.Core;
|
||||
|
||||
namespace Syntriax.Engine.Systems.Network;
|
||||
|
||||
internal static class Projection1DNetPacker
|
||||
{
|
||||
internal static void Write(NetDataWriter writer, Projection1D data)
|
||||
{
|
||||
writer.Put(data.Min);
|
||||
writer.Put(data.Max);
|
||||
}
|
||||
|
||||
internal static Projection1D Read(NetDataReader reader)
|
||||
{
|
||||
float min = reader.GetFloat();
|
||||
float max = reader.GetFloat();
|
||||
|
||||
return new Projection1D(min, max);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user