2024-02-08 18:42:57 -06:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
using UnityEngine.UI;
|
|
|
|
using UnityEngine.SceneManagement;
|
|
|
|
|
|
|
|
public class Reset : MonoBehaviour
|
|
|
|
{
|
|
|
|
public Button m_ResetButton;
|
|
|
|
// Start is called before the first frame update
|
|
|
|
void Start()
|
|
|
|
{
|
|
|
|
m_ResetButton.onClick.AddListener(() => ButtonClicked());
|
2024-02-08 19:15:28 -06:00
|
|
|
if (SceneManager.GetActiveScene().name == "_Scene_0") { this.gameObject.SetActive(false); }
|
|
|
|
else { this.gameObject.SetActive(true); }
|
2024-02-08 18:42:57 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
void ButtonClicked() {
|
|
|
|
Time.timeScale = 1;
|
|
|
|
this.gameObject.SetActive(false);
|
2024-02-08 19:15:28 -06:00
|
|
|
SceneManager.LoadScene("_Scene_0");
|
2024-02-08 18:42:57 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
// Update is called once per frame
|
|
|
|
void Update()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|