initial commit
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user