mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-18 13:23:05 +00:00
22 lines
409 B
C#
22 lines
409 B
C#
using QSB.Messages;
|
|
using QuantumUNET;
|
|
|
|
namespace QSB.Messages
|
|
{
|
|
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);
|
|
}
|
|
}
|
|
} |