quantum-space-buddies/QSB/Events/DeathMessage.cs

25 lines
597 B
C#
Raw Normal View History

2020-03-04 21:46:16 +01:00
using QSB.Messaging;
using UnityEngine.Networking;
namespace QSB.Events
{
public class DeathMessage : PlayerMessage
2020-03-04 21:46:16 +01:00
{
public override MessageType MessageType => MessageType.Death;
2020-03-04 21:46:16 +01:00
public DeathType DeathType { get; set; }
2020-03-04 21:46:16 +01:00
public override void Deserialize(NetworkReader reader)
{
2020-03-06 19:03:35 +01:00
base.Deserialize(reader);
DeathType = (DeathType)reader.ReadInt16();
2020-03-04 21:46:16 +01:00
}
public override void Serialize(NetworkWriter writer)
{
2020-03-06 19:03:35 +01:00
base.Serialize(writer);
writer.Write((short)DeathType);
2020-03-04 21:46:16 +01:00
}
}
}