quantum-space-buddies/QuantumUNET/Messages/QSBAnimationParametersMessage.cs

29 lines
598 B
C#
Raw Normal View History

2020-12-04 22:14:53 +00:00
using UnityEngine.Networking;
2020-11-08 14:41:16 +00:00
2020-12-07 21:19:16 +00:00
namespace QuantumUNET.Messages
2020-11-08 14:41:16 +00:00
{
2020-12-04 09:23:27 +00:00
internal class QSBAnimationParametersMessage : QSBMessageBase
2020-12-02 21:23:01 +00:00
{
public NetworkInstanceId netId;
public byte[] parameters;
2020-11-08 14:41:16 +00:00
2020-12-04 09:23:27 +00:00
public override void Deserialize(QSBNetworkReader reader)
2020-12-02 21:23:01 +00:00
{
netId = reader.ReadNetworkId();
parameters = reader.ReadBytesAndSize();
}
2020-11-08 14:41:16 +00:00
2020-12-04 09:23:27 +00:00
public override void Serialize(QSBNetworkWriter writer)
2020-12-02 21:23:01 +00:00
{
writer.Write(netId);
if (parameters == null)
{
writer.WriteBytesAndSize(parameters, 0);
}
else
{
writer.WriteBytesAndSize(parameters, parameters.Length);
}
}
}
2020-11-08 16:13:10 +00:00
}