2021-04-29 20:59:25 +01:00
|
|
|
|
using QSB.WorldSync;
|
2021-04-29 18:30:45 +01:00
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace QSB.Animation.NPC.WorldObjects
|
|
|
|
|
{
|
2021-04-29 21:00:02 +01:00
|
|
|
|
internal abstract class NpcAnimController<T> : WorldObject<T>, INpcAnimController
|
2021-04-29 18:30:45 +01:00
|
|
|
|
where T : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
public override void Init(T controller, int id)
|
|
|
|
|
{
|
|
|
|
|
ObjectId = id;
|
|
|
|
|
AttachedObject = controller;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public abstract CharacterDialogueTree GetDialogueTree();
|
|
|
|
|
|
2021-04-29 20:59:25 +01:00
|
|
|
|
public virtual void StartConversation()
|
|
|
|
|
=> QSBWorldSync.RaiseEvent(GetDialogueTree(), "OnStartConversation");
|
2021-04-29 18:30:45 +01:00
|
|
|
|
|
2021-04-29 20:59:25 +01:00
|
|
|
|
public virtual void EndConversation()
|
|
|
|
|
=> QSBWorldSync.RaiseEvent(GetDialogueTree(), "OnEndConversation");
|
|
|
|
|
|
|
|
|
|
public abstract bool InConversation();
|
2021-04-29 18:30:45 +01:00
|
|
|
|
}
|
|
|
|
|
}
|