quantum-space-buddies/QuantumUNET/QSBPeerAuthorityMessage.cs
2020-12-04 22:14:53 +00:00

27 lines
612 B
C#

using UnityEngine.Networking;
namespace QuantumUNET
{
public class QSBPeerAuthorityMessage : QSBMessageBase
{
public override void Deserialize(QSBNetworkReader reader)
{
this.connectionId = (int)reader.ReadPackedUInt32();
this.netId = reader.ReadNetworkId();
this.authorityState = reader.ReadBoolean();
}
public override void Serialize(QSBNetworkWriter writer)
{
writer.WritePackedUInt32((uint)this.connectionId);
writer.Write(this.netId);
writer.Write(this.authorityState);
}
public int connectionId;
public NetworkInstanceId netId;
public bool authorityState;
}
}