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

27 lines
594 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.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);
}
}
}