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

public class GameOverScreen : MonoBehaviour {

    [SerializeField] Text gameOverText;
	// Use this for initialization
	void Start () {
        CharacterManagerScript.GameState gameOverState = CharacterManagerScript.CurrentState;
        if(gameOverState == CharacterManagerScript.GameState.PlayerDied)
        {
            gameOverText.text = "YOU DIED\r\nStop doing that";
        }
        else if (gameOverState == CharacterManagerScript.GameState.KilledEnemyWin)
        {
            gameOverText.text = "YOU KILLED AN ENEMY\r\nToo bad you could've used more minions for your raves";
        }
        else if(gameOverState == CharacterManagerScript.GameState.InfectedEnemyWin)
        {
            gameOverText.text = "YOU INFECTED AN ENEMY\r\nNice job your army grows in power";
        }
        else if(gameOverState == CharacterManagerScript.GameState.MinionDied)
        {
            gameOverText.text = "YOUR BABY MINION DIED\r\nIt was so cute too";
        }
    }
	
	// Update is called once per frame
	void Update () {
		
	}

    public void LoadMainMenu()
    {
        SceneManager.LoadScene("MainMenu");
    }
}
