quantum-space-buddies/QSB/WorldSync/Events/EnumWorldObjectMessage.cs

22 lines
432 B
C#
Raw Normal View History

2021-03-29 14:36:16 +01:00
using QuantumUNET.Transport;
namespace QSB.WorldSync.Events
{
public class EnumWorldObjectMessage<T> : WorldObjectMessage
{
public T EnumValue;
public override void Deserialize(QNetworkReader reader)
{
base.Deserialize(reader);
EnumValue = (T)(object)reader.ReadInt32();
}
public override void Serialize(QNetworkWriter writer)
{
base.Serialize(writer);
writer.Write((int)(object)EnumValue);
}
}
}