29 lines
691 B
C#
Raw Normal View History

2021-12-25 23:03:23 -08:00
using QSB.Animation.NPC.WorldObjects;
using QSB.Messaging;
using QSB.WorldSync;
2021-04-29 18:30:45 +01:00
namespace QSB.Animation.NPC.Messages
2021-04-29 18:30:45 +01:00
{
2021-12-25 23:03:23 -08:00
internal class NpcAnimationMessage : QSBEnumWorldObjectMessage<INpcAnimController, AnimationEvent>
2021-04-29 18:30:45 +01:00
{
2021-12-25 23:03:23 -08:00
public NpcAnimationMessage(AnimationEvent animationEvent) => Value = animationEvent;
2021-04-29 18:30:45 +01:00
2021-12-25 23:03:23 -08:00
public NpcAnimationMessage() { }
public override bool ShouldReceive => WorldObjectManager.AllObjectsReady;
2021-04-29 18:30:45 +01:00
2021-12-25 23:03:23 -08:00
public override void OnReceiveRemote()
2021-04-29 18:30:45 +01:00
{
2021-12-25 23:03:23 -08:00
switch (Value)
{
case AnimationEvent.StartConversation:
WorldObject.StartConversation();
break;
case AnimationEvent.EndConversation:
WorldObject.EndConversation();
break;
}
2021-04-29 18:30:45 +01:00
}
}
}