mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-30 12:32:55 +00:00
32 lines
703 B
C#
32 lines
703 B
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using UnityEngine.Networking;
|
|||
|
|
|||
|
namespace QSB.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;
|
|||
|
}
|
|||
|
}
|