quantum-space-buddies/QuantumUNET/Messages/QSBAnimationParametersMessage.cs
2020-12-07 21:19:16 +00:00

29 lines
598 B
C#

using UnityEngine.Networking;
namespace QuantumUNET.Messages
{
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);
}
}
}
}