33 lines
651 B
C#
33 lines
651 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.SceneManagement;
|
|
|
|
public class GameOver : Menu<GameOver>
|
|
{
|
|
private void OnEnable()
|
|
{
|
|
StartCoroutine(DelayPause());
|
|
}
|
|
|
|
IEnumerator DelayPause()
|
|
{
|
|
yield return new WaitForSeconds(1f);
|
|
Time.timeScale = 0;
|
|
}
|
|
public void OnRestartPressed()
|
|
{
|
|
Time.timeScale = 1;
|
|
SceneController.Instance.RestartScene();
|
|
GameMenu.Open();
|
|
}
|
|
|
|
public void OnMainMenuPressed()
|
|
{
|
|
Time.timeScale = 1;
|
|
SceneManager.LoadScene(0);
|
|
MainMenu.Open();
|
|
}
|
|
}
|