28 lines
722 B
C#
Raw Normal View History

2020-02-21 23:36:07 +01:00
using QSB.Messaging;
using UnityEngine.Networking;
2020-02-12 20:58:42 +01:00
2020-02-21 23:36:07 +01:00
namespace QSB.TransformSync
2020-02-15 20:48:02 +01:00
{
2020-02-21 23:36:07 +01:00
public class SectorMessage : QSBMessage
2020-02-15 20:48:02 +01:00
{
2020-02-21 23:36:07 +01:00
public override MessageType MessageType => MessageType.Sector;
2020-02-15 20:48:02 +01:00
public int SectorId;
2020-08-08 18:57:39 +02:00
public string SectorName;
2020-02-15 20:48:02 +01:00
public uint SenderId;
2020-02-12 20:58:42 +01:00
2020-02-15 20:48:02 +01:00
public override void Deserialize(NetworkReader reader)
{
SectorId = reader.ReadInt32();
2020-08-08 18:57:39 +02:00
SectorName = reader.ReadString();
2020-02-15 20:48:02 +01:00
SenderId = reader.ReadPackedUInt32();
2020-02-12 20:58:42 +01:00
}
2020-02-15 20:48:02 +01:00
public override void Serialize(NetworkWriter writer)
{
writer.Write(SectorId);
2020-08-08 18:57:39 +02:00
writer.Write(SectorName);
2020-02-15 20:48:02 +01:00
writer.Write(SenderId);
2020-02-12 20:58:42 +01:00
}
}
}