23 lines
		
	
	
		
			501 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			501 B
		
	
	
	
		
			C#
		
	
	
	
	
	
using LiteNetLib.Utils;
 | 
						|
 | 
						|
using Engine.Core;
 | 
						|
 | 
						|
namespace Engine.Systems.Network.Packers;
 | 
						|
 | 
						|
internal static class Line2DEquationNetPacker
 | 
						|
{
 | 
						|
    internal static void Write(NetDataWriter writer, Line2DEquation data)
 | 
						|
    {
 | 
						|
        writer.Put(data.Slope);
 | 
						|
        writer.Put(data.OffsetY);
 | 
						|
    }
 | 
						|
 | 
						|
    internal static Line2DEquation Read(NetDataReader reader)
 | 
						|
    {
 | 
						|
        float slope = reader.GetFloat();
 | 
						|
        float offsetY = reader.GetFloat();
 | 
						|
 | 
						|
        return new Line2DEquation(slope, offsetY);
 | 
						|
    }
 | 
						|
}
 |