quantum-space-buddies/QSB/Messaging/EnumMessage.cs
Mister_Nebula 661c04a987 REVERT
2020-12-16 09:07:40 +00:00

21 lines
390 B
C#

using QuantumUNET;
namespace QSB.Messaging
{
public class EnumMessage<T> : PlayerMessage
{
public T Value;
public override void Deserialize(QSBNetworkReader reader)
{
base.Deserialize(reader);
Value = (T)(object)reader.ReadInt32();
}
public override void Serialize(QSBNetworkWriter writer)
{
base.Serialize(writer);
writer.Write((int)(object)Value);
}
}
}