mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-06 10:09:31 +00:00
30 lines
715 B
C#
30 lines
715 B
C#
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();
|
|
CameraDegrees = reader.ReadSingle();
|
|
}
|
|
|
|
public override void Serialize(QNetworkWriter writer)
|
|
{
|
|
base.Serialize(writer);
|
|
writer.Write(PlayerPosition);
|
|
writer.Write(PlayerRotation);
|
|
writer.Write(CameraDegrees);
|
|
}
|
|
}
|
|
}
|