quakeball/Assets/Scripts/Networking/Packets/HitPckt.cs

26 lines
627 B
C#
Raw Normal View History

2020-08-08 06:00:17 +02:00
using NeonTea.Quakeball.TeaNet.Packets;
namespace NeonTea.Quakeball.Networking.Packets {
public class HitPckt : Packet {
2020-08-08 09:08:10 +02:00
public ulong Source;
2020-08-08 06:00:17 +02:00
public ulong Target;
public HitPckt() { }
2020-08-08 09:08:10 +02:00
public HitPckt(ulong source, ulong target) {
Source = source;
Target = target;
}
2020-08-08 06:00:17 +02:00
public override void Read(ByteBuffer buffer) {
2020-08-08 09:08:10 +02:00
Source = buffer.ReadULong();
2020-08-08 06:00:17 +02:00
Target = buffer.ReadULong();
}
public override void Write(ByteBuffer buffer) {
2020-08-08 09:08:10 +02:00
buffer.Write(Source);
2020-08-08 06:00:17 +02:00
buffer.Write(Target);
}
}
}