2021-06-20 08:48:37 +00:00
|
|
|
|
using QSB.WorldSync.Events;
|
|
|
|
|
using QuantumUNET.Transport;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
2021-12-24 00:26:31 +00:00
|
|
|
|
namespace QSB.ShipSync.Messages
|
2021-06-20 08:48:37 +00:00
|
|
|
|
{
|
|
|
|
|
public class ImpactDataMessage : WorldObjectMessage
|
|
|
|
|
{
|
|
|
|
|
public Vector3 Point { get; set; }
|
|
|
|
|
public Vector3 Normal { get; set; }
|
|
|
|
|
public Vector3 Velocity { get; set; }
|
|
|
|
|
public float Speed { get; set; }
|
|
|
|
|
|
|
|
|
|
public override void Deserialize(QNetworkReader reader)
|
|
|
|
|
{
|
|
|
|
|
base.Deserialize(reader);
|
|
|
|
|
Point = reader.ReadVector3();
|
|
|
|
|
Normal = reader.ReadVector3();
|
|
|
|
|
Velocity = reader.ReadVector3();
|
|
|
|
|
Speed = reader.ReadSingle();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void Serialize(QNetworkWriter writer)
|
|
|
|
|
{
|
|
|
|
|
base.Serialize(writer);
|
|
|
|
|
writer.Write(Point);
|
|
|
|
|
writer.Write(Normal);
|
|
|
|
|
writer.Write(Velocity);
|
|
|
|
|
writer.Write(Speed);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|