You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RatAttack2D/Assets/Scripts/GameOverScreen.cs

27 lines
544 B

using UnityEngine.UI;
using UnityEngine.SceneManagement;
using System.Collections;
using UnityEngine;
using TMPro;
public class GameOverScreen : MonoBehaviour
{
public TMP_Text levelReached;
public void Setup(int score)
{
transform.Find("BackGround").gameObject.SetActive(true);
levelReached.text = score.ToString() + " LEVEL";
}
public void RespawnButton() {
SceneManager.LoadScene("Main_Game");
}
public void SaveQuitButton()
{
SceneManager.LoadScene("Main_Menu");
}
}