Bazooka Manager is basically complete now (after 2+ weeks) and start working on server rewrite

This commit is contained in:
2025-07-12 13:46:42 -07:00
parent 599b0fa545
commit 36f65c3f5a
24 changed files with 810 additions and 384 deletions

View File

@@ -1,12 +1,22 @@
using UnityEngine;
public class HideIfSettingFalse : MonoBehaviour
{
public string setting;
public class HideIfSettingFalse : MonoBehaviour {
public BazookaSetting setting;
public bool reverse;
void Awake()
{
gameObject.SetActive(PlayerPrefs.GetInt(setting, 0) == (reverse ? 0 : 1));
void Start() {
bool value = GetSettingValue(setting);
gameObject.SetActive(value == !reverse);
}
bool GetSettingValue(BazookaSetting s) {
var b = BazookaManager.Instance;
return s switch {
BazookaSetting.FullScreen => b.GetSettingFullScreen() ?? false,
BazookaSetting.ShowFPS => b.GetSettingShowFPS(),
BazookaSetting.Vsync => b.GetSettingVsync() ?? false,
BazookaSetting.HideSocials => b.GetSettingHideSocials() ?? false,
_ => false
};
}
}