quantum-space-buddies/QSB/TransformSync/SectorMessage.cs
AmazingAlek d7c0c06698
Alek/decoupling (#23)
* refactoring
2020-02-21 23:36:07 +01:00

26 lines
605 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 uint SenderId;
public override void Deserialize(NetworkReader reader)
{
SectorId = reader.ReadInt32();
SenderId = reader.ReadPackedUInt32();
}
public override void Serialize(NetworkWriter writer)
{
writer.Write(SectorId);
writer.Write(SenderId);
}
}
}