GodotTicTacToe/scripts/net/packethandling/packets/SyncPkt.cs

22 lines
574 B
C#
Raw Normal View History


2017-11-25 11:29:48 +01:00
namespace Network.PacketHandling.Packets {
public class SyncPkt : Serializable {
public int LastReliableIDReceived = -1;
public int AmountOfPackets = 0;
public override void WriteContents(PacketBuffer packetBuffer) {
packetBuffer.Write(LastReliableIDReceived);
packetBuffer.Write(AmountOfPackets);
}
public override void ReadContents(PacketBuffer packetBuffer) {
LastReliableIDReceived = packetBuffer.ReadInt();
AmountOfPackets = packetBuffer.ReadInt();
}
}
}