quantum-space-buddies/QSB/Messaging/SectorMessage.cs
AmazingAlek 22b028ce26
Alek/overhaul thing (#153)
* probe.SetState
* sectormessage enum
2020-08-10 19:44:04 +02:00

24 lines
612 B
C#

using UnityEngine.Networking;
namespace QSB.Messaging
{
public class SectorMessage : PlayerMessage
{
public Sector.Name SectorId;
public string SectorName;
public override void Deserialize(NetworkReader reader)
{
base.Deserialize(reader);
SectorId = (Sector.Name)reader.ReadInt32();
SectorName = reader.ReadString();
}
public override void Serialize(NetworkWriter writer)
{
base.Serialize(writer);
writer.Write((int)SectorId);
writer.Write(SectorName);
}
}
}