using UnityEngine;
using UnityEngine.Playables;

public class Hangout : MonoBehaviour, IInteractable
{
   
   [SerializeField] private PlayableDirector fadeOut;
   public Dialogue dialogue;
   private string[] lines;

    public void Interact()
    {
        lines = new string[]{
            "Dude, have you met Demon? Found him at the record store."
        };
        dialogue.StartDialogue(lines, "Best Friend", this.gameObject, "Scene1");
    }

    public void Scene1()
    {
        lines = new string[]{
            "Sup dude. Check out this sick paint job we're working on."
        };
        dialogue.StartDialogue(lines, "Demon", this.gameObject, "Scene2");
    }

    public void Scene2()
    {
        lines = new string[]{
            "Uh... are we supposed to be painting on-"
        };
        dialogue.StartDialogue(lines, "Teen (Old Man)", this.gameObject, "Scene3");
    }

    public void Scene3()
    {
        lines = new string[]{
            "*snickers* What? You square."
        };
        dialogue.StartDialogue(lines, "Teen (Officer)", this.gameObject, "Scene4");
    }

    public void Scene4()
    {
        lines = new string[]{
            "Grab a can, new kids. I know just what this needs!"
        };
        dialogue.StartDialogue(lines, "Demon", this.gameObject, "Scene5");
    }

    public void Scene5()
    {
        lines = new string[]{
            "B-but I remember this place! We used to play here… I don't wanna-"
        };
        dialogue.StartDialogue(lines, "Teen (Old Man)", this.gameObject, "Scene6");
    }

    public void Scene6()
    {
        lines = new string[]{
            "Ugh! Do you actually know this square?"
        };
        dialogue.StartDialogue(lines, "Teen (Officer)", this.gameObject, "Scene7");
    }

    public void Scene7()
    {
        lines = new string[]{
            "I.. I, er...",
            "I don't. Just met him earlier today."
        };
        dialogue.StartDialogue(lines, "Best Friend", this.gameObject, "Scene8");
    }
    
    public void Scene8()
    {
        lines = new string[]{
            "What...? No you-"
        };
        dialogue.StartDialogue(lines, "Teen (Old Man)", this.gameObject, "Scene9");
    }

    public void Scene9()
    {
        lines = new string[]{
            "C'mon... lets get this job done."
        };
        dialogue.StartDialogue(lines, "Best Friend", this.gameObject, "Scene10");
    }

    public void Scene10()
    {
        lines = new string[]{
            "Hell yeah! Demon Bubblz RULES!"
        };
        dialogue.StartDialogue(lines, "Demon", this.gameObject, "Scene11");
    }

    public void Scene11()
    {
        fadeOut.Play();
    }
}
