mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-18 04:10:36 +00:00
30 lines
678 B
C#
30 lines
678 B
C#
|
using QSB.Messaging;
|
|||
|
using QuantumUNET.Transport;
|
|||
|
using UnityEngine;
|
|||
|
|
|||
|
namespace QSB.QuantumSync.Events
|
|||
|
{
|
|||
|
public class MoonStateChangeMessage : PlayerMessage
|
|||
|
{
|
|||
|
public int StateIndex { get; set; }
|
|||
|
public Vector3 OnUnitSphere { get; set; }
|
|||
|
public int OrbitAngle { get; set; }
|
|||
|
|
|||
|
public override void Deserialize(QNetworkReader reader)
|
|||
|
{
|
|||
|
base.Deserialize(reader);
|
|||
|
StateIndex = reader.ReadInt32();
|
|||
|
OnUnitSphere = reader.ReadVector3();
|
|||
|
OrbitAngle = reader.ReadInt32();
|
|||
|
}
|
|||
|
|
|||
|
public override void Serialize(QNetworkWriter writer)
|
|||
|
{
|
|||
|
base.Serialize(writer);
|
|||
|
writer.Write(StateIndex);
|
|||
|
writer.Write(OnUnitSphere);
|
|||
|
writer.Write(OrbitAngle);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|