23 lines
		
	
	
		
			451 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			451 B
		
	
	
	
		
			C#
		
	
	
	
	
	
using LiteNetLib.Utils;
 | 
						|
 | 
						|
using Engine.Core;
 | 
						|
 | 
						|
namespace Engine.Systems.Network.Packers;
 | 
						|
 | 
						|
internal static class Vector2DIntNetPacker
 | 
						|
{
 | 
						|
    internal static void Write(NetDataWriter writer, Vector2DInt data)
 | 
						|
    {
 | 
						|
        writer.Put(data.X);
 | 
						|
        writer.Put(data.Y);
 | 
						|
    }
 | 
						|
 | 
						|
    internal static Vector2DInt Read(NetDataReader reader)
 | 
						|
    {
 | 
						|
        int x = reader.GetInt();
 | 
						|
        int y = reader.GetInt();
 | 
						|
 | 
						|
        return new Vector2DInt(x, y);
 | 
						|
    }
 | 
						|
}
 |