quantum-space-buddies/QSB/DeathSync/Events/PlayerDeathMessage.cs

25 lines
544 B
C#
Raw Normal View History

using QSB.Messaging;
using QuantumUNET.Transport;
namespace QSB.DeathSync.Events
{
2021-03-29 14:36:16 +01:00
public class PlayerDeathMessage : EnumMessage<DeathType>
{
public int NecronomiconIndex { get; set; }
public override void Deserialize(QNetworkReader reader)
{
base.Deserialize(reader);
2021-03-29 14:36:16 +01:00
EnumValue = (DeathType)reader.ReadInt32();
NecronomiconIndex = reader.ReadInt32();
}
public override void Serialize(QNetworkWriter writer)
{
base.Serialize(writer);
2021-03-29 14:36:16 +01:00
writer.Write((int)EnumValue);
writer.Write(NecronomiconIndex);
}
}
}