2020-08-10 18:17:54 +02:00
|
|
|
|
using UnityEngine.Networking;
|
2020-02-23 18:31:38 +01:00
|
|
|
|
|
2020-08-10 16:36:55 +01:00
|
|
|
|
namespace QSB.Messaging
|
2020-02-23 18:31:38 +01:00
|
|
|
|
{
|
2020-08-10 17:11:14 +01:00
|
|
|
|
public class AnimTriggerMessage : MessageBase
|
2020-02-23 18:31:38 +01:00
|
|
|
|
{
|
|
|
|
|
public short TriggerId;
|
2020-08-10 17:11:14 +01:00
|
|
|
|
public uint SenderId;
|
2020-07-28 01:14:32 +02:00
|
|
|
|
public float Value;
|
2020-02-23 18:31:38 +01:00
|
|
|
|
|
|
|
|
|
public override void Deserialize(NetworkReader reader)
|
|
|
|
|
{
|
2020-08-10 18:17:54 +02:00
|
|
|
|
base.Deserialize(reader);
|
2020-07-28 01:14:32 +02:00
|
|
|
|
Value = reader.ReadSingle();
|
2020-02-23 18:31:38 +01:00
|
|
|
|
TriggerId = reader.ReadInt16();
|
2020-08-10 17:11:14 +01:00
|
|
|
|
SenderId = reader.ReadPackedUInt32();
|
2020-02-23 18:31:38 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void Serialize(NetworkWriter writer)
|
|
|
|
|
{
|
2020-08-10 18:17:54 +02:00
|
|
|
|
base.Serialize(writer);
|
2020-07-28 01:14:32 +02:00
|
|
|
|
writer.Write(Value);
|
2020-02-23 18:31:38 +01:00
|
|
|
|
writer.Write(TriggerId);
|
2020-08-10 17:11:14 +01:00
|
|
|
|
writer.Write(SenderId);
|
2020-02-23 18:31:38 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|