quantum-space-buddies/QSB/ElevatorSync/ElevatorMessage.cs

26 lines
686 B
C#
Raw Normal View History

2020-08-12 19:58:29 +00:00
using QSB.Messaging;
using UnityEngine.Networking;
namespace QSB.ElevatorSync
{
public class ElevatorMessage : PlayerMessage
{
public ElevatorDirection Direction { get; set; }
public string ElevatorName { get; set; }
2020-08-12 19:58:29 +00:00
public override void Deserialize(NetworkReader reader)
{
base.Deserialize(reader);
Direction = (ElevatorDirection)reader.ReadInt32();
ElevatorName = reader.ReadString();
2020-08-12 19:58:29 +00:00
}
public override void Serialize(NetworkWriter writer)
{
base.Serialize(writer);
writer.Write((int)Direction);
writer.Write(ElevatorName);
2020-08-12 19:58:29 +00:00
}
}
}