Make it so you can press escape in any place in berrydash (almost any)
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
using System.Text;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class StatsMenu : MonoBehaviour
|
||||
{
|
||||
@@ -22,4 +24,9 @@ public class StatsMenu : MonoBehaviour
|
||||
text.AppendLine("Total Attempts: " + Tools.FormatWithCommas(BazookaManager.Instance.GetGameStoreTotalAttepts()));
|
||||
statText.text = text.ToString();
|
||||
}
|
||||
|
||||
async void Update()
|
||||
{
|
||||
if (Keyboard.current.escapeKey.wasPressedThisFrame) await SceneManager.LoadSceneAsync("MainMenu");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user