quantum-space-buddies/QSB/Messaging/PlayerDeathMessage.cs

22 lines
514 B
C#
Raw Normal View History

2020-08-09 09:37:32 +02:00
using UnityEngine.Networking;
2020-08-09 12:38:35 +01:00
namespace QSB.Messaging
2020-08-09 09:37:32 +02:00
{
2020-08-09 12:19:51 +01:00
public class PlayerDeathMessage : PlayerMessage
2020-08-09 09:37:32 +02:00
{
2020-08-09 12:19:51 +01:00
public DeathType DeathType { get; set; }
2020-08-09 09:37:32 +02:00
public override void Deserialize(NetworkReader reader)
{
base.Deserialize(reader);
2020-08-09 12:19:51 +01:00
DeathType = (DeathType)reader.ReadInt16();
2020-08-09 09:37:32 +02:00
}
public override void Serialize(NetworkWriter writer)
{
base.Serialize(writer);
2020-08-09 12:19:51 +01:00
writer.Write((short)DeathType);
2020-08-09 09:37:32 +02:00
}
}
2020-08-09 12:19:51 +01:00
}