mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-06 01:00:16 +00:00
23 lines
521 B
C#
23 lines
521 B
C#
using QuantumUNET.Transport;
|
|
using UnityEngine.Networking;
|
|
|
|
namespace QuantumUNET.Messages
|
|
{
|
|
internal class QOwnerMessage : QMessageBase
|
|
{
|
|
public NetworkInstanceId NetId;
|
|
public short PlayerControllerId;
|
|
|
|
public override void Serialize(QNetworkWriter writer)
|
|
{
|
|
writer.Write(NetId);
|
|
writer.WritePackedUInt32((uint)PlayerControllerId);
|
|
}
|
|
|
|
public override void Deserialize(QNetworkReader reader)
|
|
{
|
|
NetId = reader.ReadNetworkId();
|
|
PlayerControllerId = (short)reader.ReadPackedUInt32();
|
|
}
|
|
}
|
|
} |