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

17
PacketLib/EventQueue.cs Normal file
View file

@ -0,0 +1,17 @@
using LiteNetLib.Utils;
namespace PacketLib;
public struct EventQueue : INetSerializable {
public GameEvent[] Events{ get; set; }
public void Serialize(NetDataWriter writer) {
writer.PutArray(Events);
}
public void Deserialize(NetDataReader reader) {
Events = reader.GetArray<GameEvent>();
}
// public GameEvent this[int index] => Events[index];
}