Initial commit
This commit is contained in:
487 files changed
+181148
No files matched your search
@@ -0,0 +1,22 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class HideIfSettingFalse : MonoBehaviour {
|
||||
public SettingTypes setting;
|
||||
public bool reverse;
|
||||
|
||||
void Start() {
|
||||
bool value = GetSettingValue(setting);
|
||||
gameObject.SetActive(value == !reverse);
|
||||
}
|
||||
|
||||
bool GetSettingValue(SettingTypes s) {
|
||||
var b = BazookaManager.Instance;
|
||||
return s switch {
|
||||
SettingTypes.FullScreen => b.GetSettingFullScreen(),
|
||||
SettingTypes.ShowFPS => b.GetSettingShowFPS(),
|
||||
SettingTypes.Vsync => b.GetSettingVsync(),
|
||||
SettingTypes.HideSocials => b.GetSettingHideSocials() ?? false,
|
||||
_ => false
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user