using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;

public class TitleManager : MonoBehaviour
{
	private Scene scene;
	private Text title;
	private string correctedtitle = "";

	private void Start ()
	{
		scene = SceneManager.GetActiveScene ();
		title = GetComponentInChildren<Text> ();

		correctedtitle = correctTitleName ();
		title.text = correctedtitle;
	}

	private string correctTitleName()
	{
		string scenename = scene.name;

		switch (scenename)
		{
		case "StepCounter":
			return "Current Run";
		case "Stats":
			return "Profile";
		case "MonsterCreator":
			return "Monster Editor";
		default:
			return scenename;
		}
	}

	public Text getTitle()
	{
		return title;
	}

	public string getCorrectedTitle()
	{
		return correctedtitle;
	}
}
