2021-02-28 14:43:05 +00:00
|
|
|
|
using QSB.Messaging;
|
|
|
|
|
using QuantumUNET.Transport;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace QSB.StatueSync.Events
|
|
|
|
|
{
|
|
|
|
|
public class StartStatueMessage : PlayerMessage
|
|
|
|
|
{
|
|
|
|
|
public Vector3 PlayerPosition { get; set; }
|
|
|
|
|
public Quaternion PlayerRotation { get; set; }
|
|
|
|
|
public float CameraDegrees { get; set; }
|
|
|
|
|
|
|
|
|
|
public override void Deserialize(QNetworkReader reader)
|
|
|
|
|
{
|
|
|
|
|
base.Deserialize(reader);
|
|
|
|
|
PlayerPosition = reader.ReadVector3();
|
|
|
|
|
PlayerRotation = reader.ReadQuaternion();
|
2021-02-28 15:29:09 +00:00
|
|
|
|
CameraDegrees = reader.ReadSingle();
|
2021-02-28 14:43:05 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void Serialize(QNetworkWriter writer)
|
|
|
|
|
{
|
|
|
|
|
base.Serialize(writer);
|
|
|
|
|
writer.Write(PlayerPosition);
|
|
|
|
|
writer.Write(PlayerRotation);
|
|
|
|
|
writer.Write(CameraDegrees);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|