Change size here & change exit button logic
This commit is contained in:
2 files changed
+9
-6
No files matched your search
@@ -4144,7 +4144,7 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::SettingsMenu
|
||||
settingsMenu: {fileID: 6281518374353820338}
|
||||
colorMenu: {fileID: 3989995177718405359}
|
||||
backButton: {fileID: 7559918808190928505}
|
||||
exitButton: {fileID: 7559918808190928505}
|
||||
toggleButton: {fileID: 3801643950886844715}
|
||||
setting1toggle: {fileID: 5131992253928300218}
|
||||
setting2toggle: {fileID: 3193284483909777085}
|
||||
@@ -9340,8 +9340,8 @@ MonoBehaviour:
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 48
|
||||
m_fontSizeBase: 48
|
||||
m_fontSize: 36
|
||||
m_fontSizeBase: 36
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
|
||||
@@ -2,7 +2,6 @@ using System;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class StatsMenu : MonoBehaviour {
|
||||
@@ -28,6 +27,8 @@ public class StatsMenu : MonoBehaviour {
|
||||
|
||||
[SerializeField] private RectTransform progressFilledRect;
|
||||
|
||||
[SerializeField] private Button exitButton;
|
||||
|
||||
void Start() {
|
||||
normalBerryStat.text = Tools.FormatWithCommas(BazookaManager.Instance.GetGameStoreTotalNormalBerries());
|
||||
poisonBerryStat.text = Tools.FormatWithCommas(BazookaManager.Instance.GetGameStoreTotalPoisonBerries());
|
||||
@@ -82,10 +83,12 @@ public class StatsMenu : MonoBehaviour {
|
||||
SetXPProgressFilled((int)percentDone);
|
||||
|
||||
Tools.RefreshHierarchy(panel);
|
||||
|
||||
exitButton.onClick.AddListener(() => Destroy(gameObject));
|
||||
}
|
||||
|
||||
async void Update() {
|
||||
if (Keyboard.current.escapeKey.wasPressedThisFrame) await SceneManager.LoadSceneAsync("MainMenu");
|
||||
void Update() {
|
||||
if (Keyboard.current.escapeKey.wasPressedThisFrame && exitButton.interactable) exitButton.onClick.Invoke();
|
||||
}
|
||||
|
||||
void SetXPProgressFilled(int progress) {
|
||||
|
||||
Reference in new issue
Block a user