Make it so you can press esc to get out of stats menu
This commit is contained in:
2 files changed
+5
-3
No files matched your search
@@ -2431,7 +2431,6 @@ MonoBehaviour:
|
||||
boostText: {fileID: 497996347}
|
||||
bird: {fileID: 808236448}
|
||||
pausePanel: {fileID: 302151016}
|
||||
statsPanel: {fileID: 1140906499}
|
||||
rb: {fileID: 808236449}
|
||||
backgroundMusic: {fileID: 1625416039}
|
||||
berryParent: {fileID: 157908646}
|
||||
|
||||
@@ -32,7 +32,6 @@ public class GamePlayer : MonoBehaviour
|
||||
public TMP_Text boostText;
|
||||
public GameObject bird;
|
||||
public GameObject pausePanel;
|
||||
public GameObject statsPanel;
|
||||
public Rigidbody2D rb;
|
||||
public AudioSource backgroundMusic;
|
||||
private float lastMoveTime;
|
||||
@@ -591,7 +590,11 @@ public class GamePlayer : MonoBehaviour
|
||||
|
||||
internal void TogglePause()
|
||||
{
|
||||
if (statsPanel.activeSelf) return;
|
||||
if (GamePlayerPauseMenu.Instance != null && GamePlayerPauseMenu.Instance.statsMenu.activeSelf)
|
||||
{
|
||||
GamePlayerPauseMenu.Instance.statsMenuExitButton.onClick.Invoke();
|
||||
return;
|
||||
}
|
||||
if (pausePanel.activeSelf)
|
||||
{
|
||||
DisablePause();
|
||||
|
||||
Reference in new issue
Block a user