2020-12-16 09:07:40 +00:00
|
|
|
|
using QuantumUNET;
|
2020-11-01 12:11:36 +00:00
|
|
|
|
|
2020-12-14 16:28:03 +00:00
|
|
|
|
namespace QSB.Messaging
|
2020-11-01 12:11:36 +00:00
|
|
|
|
{
|
2020-12-02 21:23:01 +00:00
|
|
|
|
public class EnumMessage<T> : PlayerMessage
|
|
|
|
|
{
|
|
|
|
|
public T Value;
|
2020-11-01 12:11:36 +00:00
|
|
|
|
|
2020-12-04 09:23:27 +00:00
|
|
|
|
public override void Deserialize(QSBNetworkReader reader)
|
2020-12-02 21:23:01 +00:00
|
|
|
|
{
|
|
|
|
|
base.Deserialize(reader);
|
|
|
|
|
Value = (T)(object)reader.ReadInt32();
|
|
|
|
|
}
|
2020-11-01 12:11:36 +00:00
|
|
|
|
|
2020-12-04 09:23:27 +00:00
|
|
|
|
public override void Serialize(QSBNetworkWriter writer)
|
2020-12-02 21:23:01 +00:00
|
|
|
|
{
|
|
|
|
|
base.Serialize(writer);
|
|
|
|
|
writer.Write((int)(object)Value);
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-12-03 08:28:05 +00:00
|
|
|
|
}
|