quantum-space-buddies/QuantumUNET/QSBAnimationParametersMessage.cs
2020-12-04 22:14:53 +00:00

29 lines
589 B
C#

using UnityEngine.Networking;
namespace QuantumUNET
{
internal class QSBAnimationParametersMessage : QSBMessageBase
{
public NetworkInstanceId netId;
public byte[] parameters;
public override void Deserialize(QSBNetworkReader reader)
{
netId = reader.ReadNetworkId();
parameters = reader.ReadBytesAndSize();
}
public override void Serialize(QSBNetworkWriter writer)
{
writer.Write(netId);
if (parameters == null)
{
writer.WriteBytesAndSize(parameters, 0);
}
else
{
writer.WriteBytesAndSize(parameters, parameters.Length);
}
}
}
}