mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-27 03:35:20 +00:00
29 lines
742 B
C#
29 lines
742 B
C#
using UnityEngine.Networking;
|
|
|
|
namespace QSB.Animation.Events
|
|
{
|
|
class QSBAnimationParametersMessage : MessageBase
|
|
{
|
|
public NetworkInstanceId netId;
|
|
public byte[] parameters;
|
|
|
|
public override void Deserialize(NetworkReader reader)
|
|
{
|
|
netId = reader.ReadNetworkId();
|
|
parameters = reader.ReadBytesAndSize();
|
|
}
|
|
|
|
public override void Serialize(NetworkWriter writer)
|
|
{
|
|
writer.Write(netId);
|
|
if (parameters == null)
|
|
{
|
|
writer.WriteBytesAndSize(parameters, 0);
|
|
}
|
|
else
|
|
{
|
|
writer.WriteBytesAndSize(parameters, parameters.Length);
|
|
}
|
|
}
|
|
}
|
|
} |