using UnityEngine;

public class InterrogationTableCan : 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[]{"...Bunch of sand in it."};
            dialogue.StartDialogue(lines, "Officer", this.gameObject, "OldManReply");
        }
        else
        {
            lines = new string[]{"Guess I'd better go look for his spray can..."};
            dialogue.StartDialogue(lines);
        }
    }

    public void OldManReply()
    {
        lines = new string[]{"...And the air canister that first blew it off its course?"};
        dialogue.StartDialogue(lines, "Old Man", this.gameObject, "OfficerReply");
    }

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