quantum-space-buddies/QSB/QuantumSync/Events/SocketStateChangeMessage.cs

27 lines
596 B
C#
Raw Normal View History

2020-12-22 21:39:53 +00:00
using QSB.WorldSync.Events;
using QuantumUNET.Transport;
using UnityEngine;
namespace QSB.QuantumSync.Events
{
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; }
public override void Deserialize(QSBNetworkReader reader)
{
base.Deserialize(reader);
SocketId = reader.ReadInt32();
LocalRotation = reader.ReadQuaternion();
}
public override void Serialize(QSBNetworkWriter writer)
{
base.Serialize(writer);
writer.Write(SocketId);
writer.Write(LocalRotation);
}
}
}