using UnityEngine;
using UnityEngine.Playables;

public class HangoutCity : MonoBehaviour, IInteractable
{

    [SerializeField] private PlayableDirector fadeOut;
    [SerializeField] private Animator demonAnimator;
    public Dialogue dialogue;
    private string[] lines;
   
    public void Interact()
    {
        lines = new string[]{
            "Demon! Ready to make that trade?"
        };
        dialogue.StartDialogue(lines, "Best Friend", this.gameObject, "Scene1");
    }

    public void Scene1()
    {
        lines = new string[]{
            "... Hand it over. All of it."
        };
        demonAnimator.Play("Gun");
        dialogue.StartDialogue(lines, "Demon", this.gameObject, "Scene2");
    }

    public void Scene2()
    {
        lines = new string[]{
            "H-hey! This wasn’t the deal!"
        };
        dialogue.StartDialogue(lines, "Best Friend", this.gameObject, "Scene3");
    }

    public void Scene3()
    {
        lines = new string[]{
            "Woah! Is that a gun?!"
        };
        dialogue.StartDialogue(lines, "Man (Old Man)", this.gameObject, "Scene4");
    }

    public void Scene4()
    {
        lines = new string[]{
            "No, square. It's a bubble blower.",
            "Except it blows “Demon Bubbles”, which hurt WAY more than SQUARE bubbles!",
            "...Wanna find out how much? HAND. IT. OVER."
        };
        dialogue.StartDialogue(lines, "Demon", this.gameObject, "Scene5");
    }

    public void Scene5()
    {
        lines = new string[]{
            "No!"
        };
        dialogue.StartDialogue(lines, "Best Friend", this.gameObject, "Scene6");
        fadeOut.Play();
    }



}
