using System.IO;

namespace Crysome.Common.Network.Packets.Server;

public class RemoteInputPacket : IPacket
{
	public byte Kind { get; set; }

	public int X { get; set; }

	public int Y { get; set; }

	public int ButtonOrKey { get; set; }

	public void Write(BinaryWriter w)
	{
		w.Write(Kind);
		w.Write(X);
		w.Write(Y);
		w.Write(ButtonOrKey);
	}

	public void Read(BinaryReader r)
	{
		Kind = r.ReadByte();
		X = r.ReadInt32();
		Y = r.ReadInt32();
		ButtonOrKey = r.ReadInt32();
	}
}
