Funkční komunikace mezi jedním clientem a serverem
This commit is contained in:
commit
3f235f6e04
44 changed files with 1030 additions and 0 deletions
17
PacketLib/EventQueue.cs
Normal file
17
PacketLib/EventQueue.cs
Normal 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];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue