quantum-space-buddies/QSB/TransformSync/SectorMessage.cs
2020-08-08 18:57:39 +02:00

28 lines
722 B
C#

using QSB.Messaging;
using UnityEngine.Networking;
namespace QSB.TransformSync
{
public class SectorMessage : QSBMessage
{
public override MessageType MessageType => MessageType.Sector;
public int SectorId;
public string SectorName;
public uint SenderId;
public override void Deserialize(NetworkReader reader)
{
SectorId = reader.ReadInt32();
SectorName = reader.ReadString();
SenderId = reader.ReadPackedUInt32();
}
public override void Serialize(NetworkWriter writer)
{
writer.Write(SectorId);
writer.Write(SectorName);
writer.Write(SenderId);
}
}
}