using UnityEngine;

public class InterrogationTableGun : MonoBehaviour, IInteractable
{
    public Dialogue dialogue;
    private string[] lines;
    private bool hasInteracted = false;
    [SerializeField] private GameObject sprayCan;

    public void Interact()
    {
        if(!hasInteracted)
        {
            hasInteracted = true;
            lines = new string[]{"Hey... Can I ask you som-"};
            dialogue.StartDialogue(lines, "Officer", this.gameObject, "OldManReply");
        }
        else
        {
            lines = new string[]{"What could he be talking about?"};
            dialogue.StartDialogue(lines);
        }
    }

    public void OldManReply()
    {
        lines = new string[]{"And at last, the blower of Demon Bubbles that sealed its fate?"};
        dialogue.StartDialogue(lines, "Old Man", this.gameObject, "OfficerReply");
    }

    public void OfficerReply()
    {
        sprayCan.SetActive(true);
        lines = new string[]{"Uh... sure thing."};
        dialogue.StartDialogue(lines);
    }
}
