Change size here & change exit button logic

This commit is contained in:
Lncvrt committed 2026-03-08 10:51:16 -07:00
1 parent c63309f90f
commit 5b05607641
2 files changed
+9 -6

No files matched your search

+3 -3
View File
@@ -4144,7 +4144,7 @@ MonoBehaviour:
m_EditorClassIdentifier: Assembly-CSharp::SettingsMenu m_EditorClassIdentifier: Assembly-CSharp::SettingsMenu
settingsMenu: {fileID: 6281518374353820338} settingsMenu: {fileID: 6281518374353820338}
colorMenu: {fileID: 3989995177718405359} colorMenu: {fileID: 3989995177718405359}
backButton: {fileID: 7559918808190928505} exitButton: {fileID: 7559918808190928505}
toggleButton: {fileID: 3801643950886844715} toggleButton: {fileID: 3801643950886844715}
setting1toggle: {fileID: 5131992253928300218} setting1toggle: {fileID: 5131992253928300218}
setting2toggle: {fileID: 3193284483909777085} setting2toggle: {fileID: 3193284483909777085}
@@ -9340,8 +9340,8 @@ MonoBehaviour:
m_faceColor: m_faceColor:
serializedVersion: 2 serializedVersion: 2
rgba: 4294967295 rgba: 4294967295
m_fontSize: 48 m_fontSize: 36
m_fontSizeBase: 48 m_fontSizeBase: 36
m_fontWeight: 400 m_fontWeight: 400
m_enableAutoSizing: 0 m_enableAutoSizing: 0
m_fontSizeMin: 18 m_fontSizeMin: 18
+6 -3
View File
@@ -2,7 +2,6 @@ using System;
using TMPro; using TMPro;
using UnityEngine; using UnityEngine;
using UnityEngine.InputSystem; using UnityEngine.InputSystem;
using UnityEngine.SceneManagement;
using UnityEngine.UI; using UnityEngine.UI;
public class StatsMenu : MonoBehaviour { public class StatsMenu : MonoBehaviour {
@@ -28,6 +27,8 @@ public class StatsMenu : MonoBehaviour {
[SerializeField] private RectTransform progressFilledRect; [SerializeField] private RectTransform progressFilledRect;
[SerializeField] private Button exitButton;
void Start() { void Start() {
normalBerryStat.text = Tools.FormatWithCommas(BazookaManager.Instance.GetGameStoreTotalNormalBerries()); normalBerryStat.text = Tools.FormatWithCommas(BazookaManager.Instance.GetGameStoreTotalNormalBerries());
poisonBerryStat.text = Tools.FormatWithCommas(BazookaManager.Instance.GetGameStoreTotalPoisonBerries()); poisonBerryStat.text = Tools.FormatWithCommas(BazookaManager.Instance.GetGameStoreTotalPoisonBerries());
@@ -82,10 +83,12 @@ public class StatsMenu : MonoBehaviour {
SetXPProgressFilled((int)percentDone); SetXPProgressFilled((int)percentDone);
Tools.RefreshHierarchy(panel); Tools.RefreshHierarchy(panel);
exitButton.onClick.AddListener(() => Destroy(gameObject));
} }
async void Update() { void Update() {
if (Keyboard.current.escapeKey.wasPressedThisFrame) await SceneManager.LoadSceneAsync("MainMenu"); if (Keyboard.current.escapeKey.wasPressedThisFrame && exitButton.interactable) exitButton.onClick.Invoke();
} }
void SetXPProgressFilled(int progress) { void SetXPProgressFilled(int progress) {