2020-09-22 20:39:53 +00:00
|
|
|
|
using QSB.Events;
|
2020-09-22 20:11:29 +00:00
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace QSB.ConversationSync
|
|
|
|
|
{
|
|
|
|
|
public class ConversationManager : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
public static ConversationManager Instance { get; private set; }
|
|
|
|
|
|
2020-09-29 18:42:45 +00:00
|
|
|
|
private void Start()
|
2020-09-22 20:11:29 +00:00
|
|
|
|
{
|
|
|
|
|
Instance = this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void SendPlayerOption(string text)
|
|
|
|
|
{
|
2020-09-29 18:42:45 +00:00
|
|
|
|
GlobalMessenger<int, string, ConversationType>.FireEvent(EventNames.QSBConversation, -1, text, ConversationType.Player);
|
2020-09-22 20:11:29 +00:00
|
|
|
|
}
|
|
|
|
|
|
2020-09-22 20:39:53 +00:00
|
|
|
|
public void SendCharacterDialogue(int id, string text)
|
2020-09-22 20:11:29 +00:00
|
|
|
|
{
|
2020-09-29 18:42:45 +00:00
|
|
|
|
GlobalMessenger<int, string, ConversationType>.FireEvent(EventNames.QSBConversation, id, text, ConversationType.Character);
|
2020-09-22 20:11:29 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|