// Use this for initialization
protected virtual void OnEnable()
{
DialogueManager manager = DialogueManager.LoadDialogueFile(dialogFile);
currentDialogue = manager.GetDialogue(dialogName);
currentDialogue.Start();
Dialogue.Choice[] choices = currentDialogue.GetChoices();
Debug.Log(choices.Length);
if (choices.Length > 0)
{
if (choices.Length == 1)
{
currentChoice = choices[0];
currentDialogue.PickChoice(currentChoice);
nextChoices = currentDialogue.GetChoices();
}
else
{
currentChoice = null;
nextChoices = choices;
}
LevelManager.Instance().clickLocked = true;
SetupDialogueBox();
this.gameObject.SetActive(false);
}
}