using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class UtilityScript : MonoBehaviour {
    public Text Name;
    public DialogueScript Dialogue;
	// Use this for initialization
	void Start () {
        Dialogue = FindObjectOfType<DialogueScript>();
	}

    public void NextScene()
    {
        Application.LoadLevel("Scene2");
    }
    public void NextNextScene()
    {
        Application.LoadLevel("TestScene");
    }
	// Update is called once per frame
	void Update () {
        if (Dialogue.CurrentLine == 0 || Dialogue.CurrentLine == 10 || Dialogue.CurrentLine == 13 || Dialogue.CurrentLine == 18 || Dialogue.CurrentLine == 20 || Dialogue.CurrentLine == 22 || Dialogue.CurrentLine == 26 || Dialogue.CurrentLine == 29 || Dialogue.CurrentLine == 34 || Dialogue.CurrentLine == 39 || Dialogue.CurrentLine == 46 || Dialogue.CurrentLine == 57 || Dialogue.CurrentLine == 59 || Dialogue.CurrentLine == 68 || Dialogue.CurrentLine == 75 || Dialogue.CurrentLine == 79 || Dialogue.CurrentLine == 86 || Dialogue.CurrentLine == 123 || Dialogue.CurrentLine == 124 || Dialogue.CurrentLine == 140 || Dialogue.CurrentLine == 156 || Dialogue.CurrentLine == 158 || Dialogue.CurrentLine == 159 || Dialogue.CurrentLine == 161 || Dialogue.CurrentLine == 163 || Dialogue.CurrentLine == 166 || Dialogue.CurrentLine == 168 || Dialogue.CurrentLine == 170 || Dialogue.CurrentLine == 171 || Dialogue.CurrentLine == 177 || Dialogue.CurrentLine == 180 || Dialogue.CurrentLine == 189 || Dialogue.CurrentLine == 198)
        {
            Name.text = "Selkie";
        }
        else if (Dialogue.CurrentLine >= 6 && Dialogue.CurrentLine <= 8)
        {
            Name.text = "Selkie";
        }
        else if (Dialogue.CurrentLine >= 182 && Dialogue.CurrentLine <= 186)
        {
            Name.text = "Selkie";
        }
        else if (Dialogue.CurrentLine >= 126 && Dialogue.CurrentLine <= 128)
        {
            Name.text = "Selkie";
        }
        else if (Dialogue.CurrentLine >= 149 && Dialogue.CurrentLine <= 153)
        {
            Name.text = "Selkie";
        }
        else if (Dialogue.CurrentLine >= 142 && Dialogue.CurrentLine <= 144)
        {
            Name.text = "Selkie";
        }
        else if (Dialogue.CurrentLine >= 134 && Dialogue.CurrentLine <= 136)
        {
            Name.text = "Selkie";
        }
        else if (Dialogue.CurrentLine == 83 || Dialogue.CurrentLine == 84)
        {
            Name.text = "Selkie";
        }
        else if (Dialogue.CurrentLine >= 1 && Dialogue.CurrentLine <= 5)
        {
            Name.text = "Barman";
        }
        else if (Dialogue.CurrentLine >= 14 && Dialogue.CurrentLine <= 17)
        {
            Name.text = "Barman";
        }
        else if (Dialogue.CurrentLine >= 23 && Dialogue.CurrentLine <= 25)
        {
            Name.text = "Barman";
        }
        else if (Dialogue.CurrentLine == 9 || Dialogue.CurrentLine == 11 || Dialogue.CurrentLine == 12 || Dialogue.CurrentLine == 19 || Dialogue.CurrentLine == 21 || Dialogue.CurrentLine == 27)
        {
            Name.text = "Barman";
        }
        else if (Dialogue.CurrentLine >= 30 && Dialogue.CurrentLine <= 33)
        {
            Name.text = "Brian";
        }
        else if (Dialogue.CurrentLine >= 35 && Dialogue.CurrentLine <= 38)
        {
            Name.text = "Brian";
        }
        else if (Dialogue.CurrentLine >= 40 && Dialogue.CurrentLine <= 45)
        {
            Name.text = "Brian";
        }
        else if (Dialogue.CurrentLine >= 47 && Dialogue.CurrentLine <= 53)
        {
            Name.text = "Angry Woman";
        }
        else if (Dialogue.CurrentLine == 58)
        {
            Name.text = "Anna";
        }
        else if (Dialogue.CurrentLine >= 60 && Dialogue.CurrentLine <= 67)
        {
            Name.text = "Anna";
        }
        else if (Dialogue.CurrentLine >= 69 && Dialogue.CurrentLine <= 74)
        {
            Name.text = "Anna";
        }
        else if (Dialogue.CurrentLine >= 76 && Dialogue.CurrentLine <= 78)
        {
            Name.text = "Luci";
        }
        else if (Dialogue.CurrentLine >= 80 && Dialogue.CurrentLine <= 82)
        {
            Name.text = "Luci";
        }
        else if (Dialogue.CurrentLine == 85)
        {
            Name.text = "Luci";
        }
        else if (Dialogue.CurrentLine >= 87 && Dialogue.CurrentLine <= 91)
        {
            Name.text = "Luci";
        }
        else if (Dialogue.CurrentLine == 125)
        {
            Name.text = "???";
        }
        else if (Dialogue.CurrentLine == 141)
        {
            Name.text = "???";
        }
        else if (Dialogue.CurrentLine == 157)
        {
            Name.text = "???";
        }
        else if (Dialogue.CurrentLine == 160)
        {
            Name.text = "???";
        }
        else if (Dialogue.CurrentLine == 162)
        {
            Name.text = "???";
        }
        else if (Dialogue.CurrentLine == 164)
        {
            Name.text = "???";
        }
        else if (Dialogue.CurrentLine == 165)
        {
            Name.text = "???";
        }
        else if (Dialogue.CurrentLine == 167)
        {
            Name.text = "???";
        }
        else if (Dialogue.CurrentLine == 169)
        {
            Name.text = "???";
        }
        else if (Dialogue.CurrentLine == 176)
        {
            Name.text = "???";
        }
        else if (Dialogue.CurrentLine == 181)
        {
            Name.text = "???";
        }
        else if (Dialogue.CurrentLine >= 125 && Dialogue.CurrentLine <= 133)
        {
            Name.text = "???";
        }
        else if (Dialogue.CurrentLine >= 136 && Dialogue.CurrentLine <= 139)
        {
            Name.text = "???";
        }
        else if (Dialogue.CurrentLine >= 146 && Dialogue.CurrentLine <= 148)
        {
            Name.text = "???";
        }
        else if (Dialogue.CurrentLine >= 154 && Dialogue.CurrentLine <= 155)
        {
            Name.text = "???";
        }
        else if (Dialogue.CurrentLine >= 173 && Dialogue.CurrentLine <= 174)
        {
            Name.text = "???";
        }
        else if (Dialogue.CurrentLine >= 178 && Dialogue.CurrentLine <= 179)
        {
            Name.text = "???";
        }
    }
}
