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

namespace Machete {
public class EndGame : MonoBehaviour {

  [SerializeField]
  Text note;

	// Use this for initialization
	void Start () {
    string noteChar = "";
    switch (GameManager.Points) {
      case 0:
      case 1:
      case 2:
        SoundManager.Instance.PlaySound("Angry");
        noteChar = "F";
        break;
      case 3:
        noteChar = "C";
        break;
      case 4:
        SoundManager.Instance.PlaySound("Success");
        noteChar = "A";
        break;
    }
    note.text = noteChar;
	}

  void Update() {
    if (Input.GetKeyDown(KeyCode.Escape)) {
      Application.Quit();
    }
  }

  public void ResetGame() {
    SceneManager.LoadScene("Cheaters");
  }
}
}