2020-03-04 21:46:16 +01:00
|
|
|
|
using QSB.Messaging;
|
|
|
|
|
using UnityEngine.Networking;
|
|
|
|
|
|
|
|
|
|
namespace QSB.Events
|
|
|
|
|
{
|
2020-05-19 20:05:15 +02:00
|
|
|
|
public class DeathMessage : PlayerMessage
|
2020-03-04 21:46:16 +01:00
|
|
|
|
{
|
2020-03-06 05:16:41 +01:00
|
|
|
|
public override MessageType MessageType => MessageType.Death;
|
2020-03-04 21:46:16 +01:00
|
|
|
|
|
2020-03-07 16:44:08 +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);
|
2020-03-07 16:44:08 +01:00
|
|
|
|
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);
|
2020-03-07 16:44:08 +01:00
|
|
|
|
writer.Write((short)DeathType);
|
2020-03-04 21:46:16 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|