quantum-space-buddies/QuantumUNET/Messages/QSBAnimationParametersMessage.cs
Mister_Nebula 6148bee639 more clean
2020-12-15 09:56:03 +00:00

27 lines
570 B
C#

namespace QuantumUNET.Messages
{
internal class QSBAnimationParametersMessage : QSBMessageBase
{
public QSBNetworkInstanceId 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);
}
}
}
}