quantum-space-buddies/QSB/Animation/NPC/Events/NpcAnimationMessage.cs

26 lines
616 B
C#
Raw Normal View History

2021-04-29 17:30:45 +00:00
using QSB.Messaging;
using QuantumUNET.Transport;
namespace QSB.Animation.NPC.Events
{
2021-04-29 20:00:02 +00:00
internal class NpcAnimationMessage : PlayerMessage
2021-04-29 17:30:45 +00:00
{
public AnimationEvent AnimationEvent { get; set; }
public int AnimControllerIndex { get; set; }
public override void Deserialize(QNetworkReader reader)
{
base.Deserialize(reader);
AnimationEvent = (AnimationEvent)reader.ReadInt32();
AnimControllerIndex = reader.ReadInt32();
}
public override void Serialize(QNetworkWriter writer)
{
base.Serialize(writer);
writer.Write((int)AnimationEvent);
writer.Write(AnimControllerIndex);
}
}
}