2020-12-22 21:39:53 +00:00
|
|
|
|
using QSB.WorldSync.Events;
|
|
|
|
|
using QuantumUNET.Transport;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
2021-12-24 00:26:31 +00:00
|
|
|
|
namespace QSB.QuantumSync.Messages
|
2020-12-22 21:39:53 +00:00
|
|
|
|
{
|
2020-12-23 11:26:47 +00:00
|
|
|
|
public class SocketStateChangeMessage : WorldObjectMessage
|
2020-12-22 21:39:53 +00:00
|
|
|
|
{
|
|
|
|
|
public int SocketId { get; set; }
|
|
|
|
|
public Quaternion LocalRotation { get; set; }
|
|
|
|
|
|
2020-12-23 12:58:45 +00:00
|
|
|
|
public override void Deserialize(QNetworkReader reader)
|
2020-12-22 21:39:53 +00:00
|
|
|
|
{
|
|
|
|
|
base.Deserialize(reader);
|
|
|
|
|
SocketId = reader.ReadInt32();
|
|
|
|
|
LocalRotation = reader.ReadQuaternion();
|
|
|
|
|
}
|
|
|
|
|
|
2020-12-23 12:58:45 +00:00
|
|
|
|
public override void Serialize(QNetworkWriter writer)
|
2020-12-22 21:39:53 +00:00
|
|
|
|
{
|
|
|
|
|
base.Serialize(writer);
|
|
|
|
|
writer.Write(SocketId);
|
|
|
|
|
writer.Write(LocalRotation);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|