using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; public class DeathMenu : MonoBehaviour { PlayerMovement playerMovement; [SerializeField] GameObject player; public GameObject deathMenuUI; void Awake() { playerMovement = player.GetComponent(); } void Update() { if (playerMovement.isAlive == false) { deathMenuUI.SetActive(true); } } public void Restart() { SceneManager.LoadScene("MainScene"); deathMenuUI.SetActive(false); } public void LoadMenu() { Time.timeScale = 1f; SceneManager.LoadScene("Menu"); } public void QuitGame() { Debug.Log("Quiting Game"); Application.Quit(); } }