Web changes

This commit is contained in:
2025-06-06 00:03:00 -07:00
parent 098ff4fb16
commit 7548eebc5b
2 changed files with 10 additions and 3 deletions

View File

@@ -27,12 +27,12 @@ public class LoadingMenu : MonoBehaviour
PlayerPrefs.DeleteKey("HighScore"); PlayerPrefs.DeleteKey("HighScore");
} }
QualitySettings.vSyncCount = PlayerPrefs.GetInt("Setting3", 1) == 1 ? 1 : -1; QualitySettings.vSyncCount = PlayerPrefs.GetInt("Setting3", 1) == 1 ? 1 : -1;
Screen.fullScreen = PlayerPrefs.GetInt("Setting1", 1) == 1; if (!Application.isMobilePlatform && Application.platform != RuntimePlatform.WebGLPlayer)
if (!Application.isMobilePlatform)
{ {
SetIfNone("Setting1", 1); SetIfNone("Setting1", 1);
SetIfNone("Setting2", 0); SetIfNone("Setting2", 0);
SetIfNone("Setting3", 1); SetIfNone("Setting3", 1);
Screen.fullScreen = PlayerPrefs.GetInt("Setting1", 1) == 1;
} }
else else
{ {
@@ -41,6 +41,9 @@ public class LoadingMenu : MonoBehaviour
SetIfNone("Setting3", 1, true); SetIfNone("Setting3", 1, true);
Application.targetFrameRate = 360; Application.targetFrameRate = 360;
QualitySettings.vSyncCount = 0; QualitySettings.vSyncCount = 0;
if (Application.platform == RuntimePlatform.WebGLPlayer) {
Screen.fullScreen = false;
}
} }
PlayerPrefs.SetString("latestVersion", Application.version); PlayerPrefs.SetString("latestVersion", Application.version);
updateButton.onClick.AddListener(() => updateButton.onClick.AddListener(() =>

View File

@@ -13,7 +13,7 @@ public class SettingsMenu : MonoBehaviour
{ {
musicSlider.value = PlayerPrefs.GetFloat("musicVolume", 1f); musicSlider.value = PlayerPrefs.GetFloat("musicVolume", 1f);
sfxSlider.value = PlayerPrefs.GetFloat("sfxVolume", 1f); sfxSlider.value = PlayerPrefs.GetFloat("sfxVolume", 1f);
if (!Application.isMobilePlatform) if (!Application.isMobilePlatform && Application.platform != RuntimePlatform.WebGLPlayer)
{ {
setting1toggle.isOn = PlayerPrefs.GetInt("Setting1", 1) == 1; setting1toggle.isOn = PlayerPrefs.GetInt("Setting1", 1) == 1;
setting2toggle.isOn = PlayerPrefs.GetInt("Setting2", 0) == 1; setting2toggle.isOn = PlayerPrefs.GetInt("Setting2", 0) == 1;
@@ -24,6 +24,10 @@ public class SettingsMenu : MonoBehaviour
setting1toggle.interactable = false; setting1toggle.interactable = false;
setting2toggle.isOn = PlayerPrefs.GetInt("Setting2", 0) == 1; setting2toggle.isOn = PlayerPrefs.GetInt("Setting2", 0) == 1;
setting3toggle.interactable = false; setting3toggle.interactable = false;
if (Application.platform == RuntimePlatform.WebGLPlayer)
{
setting1toggle.isOn = false;
}
} }
setting1toggle.onValueChanged.AddListener(value => setting1toggle.onValueChanged.AddListener(value =>
{ {