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

23 lines
535 B
C#
Raw Normal View History

2020-08-13 21:46:16 +02:00
using QSB.Messaging;
using UnityEngine.Networking;
2020-08-09 09:37:32 +02:00
2020-08-13 21:46:16 +02:00
namespace QSB.DeathSync
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
}