quantum-space-buddies/QuantumUNET/Messages/QAnimationParametersMessage.cs
2020-12-23 12:58:45 +00:00

23 lines
524 B
C#

using QuantumUNET.Transport;
using UnityEngine.Networking;
namespace QuantumUNET.Messages
{
internal class QAnimationParametersMessage : QMessageBase
{
public NetworkInstanceId netId;
public byte[] parameters;
public override void Deserialize(QNetworkReader reader)
{
netId = reader.ReadNetworkId();
parameters = reader.ReadBytesAndSize();
}
public override void Serialize(QNetworkWriter writer)
{
writer.Write(netId);
writer.WriteBytesAndSize(parameters, parameters?.Length ?? 0);
}
}
}