Funkční komunikace mezi jedním clientem a serverem

This commit is contained in:
Perry 2025-12-19 17:54:50 +01:00
commit 3f235f6e04
44 changed files with 1030 additions and 0 deletions

29
PacketLib/PlayerState.cs Normal file
View file

@ -0,0 +1,29 @@
using LiteNetLib;
using LiteNetLib.Utils;
namespace PacketLib;
public struct PlayerState : INetSerializable {
public uint pid;
public int camera;
public bool monitorUp;
public void Serialize(NetDataWriter writer) {
writer.Put(pid);
writer.Put(camera);
writer.Put(monitorUp);
}
public void Deserialize(NetDataReader reader) {
pid = reader.GetUInt();
camera = reader.GetInt();
monitorUp = reader.GetBool();
}
}