diff --git a/Assets/Scripts/BazookaManager.cs b/Assets/Scripts/BazookaManager.cs index d45e11a..7bffb77 100644 --- a/Assets/Scripts/BazookaManager.cs +++ b/Assets/Scripts/BazookaManager.cs @@ -67,319 +67,6 @@ public class BazookaManager : MonoBehaviour { saveFile["version"] = "0"; } - if (!PlayerPrefs.HasKey("LegacyConversion")) - { - PlayerPrefs.SetInt("LegacyConversion", 1); - if (PlayerPrefs.HasKey("HighScoreV2")) - { - try - { - SetGameStoreHighScore(BigInteger.Parse(PlayerPrefs.GetString("HighScoreV2", "0"))); - } - catch - { - Debug.LogError("Failed to migrate HighScoreV2 to new save format"); - } - PlayerPrefs.DeleteKey("HighScoreV2"); - } - if (PlayerPrefs.HasKey("TotalNormalBerries")) - { - try - { - SetGameStoreTotalNormalBerries(BigInteger.Parse(PlayerPrefs.GetString("TotalNormalBerries", "0"))); - } - catch - { - Debug.LogError("Failed to migrate TotalNormalBerries to new save format"); - } - PlayerPrefs.DeleteKey("TotalNormalBerries"); - } - if (PlayerPrefs.HasKey("TotalPoisonBerries")) - { - try - { - SetGameStoreTotalPoisonBerries(BigInteger.Parse(PlayerPrefs.GetString("TotalPoisonBerries", "0"))); - } - catch - { - Debug.LogError("Failed to migrate TotalPoisonBerries to new save format"); - } - PlayerPrefs.DeleteKey("TotalPoisonBerries"); - } - if (PlayerPrefs.HasKey("TotalSlowBerries")) - { - try - { - SetGameStoreTotalSlowBerries(BigInteger.Parse(PlayerPrefs.GetString("TotalSlowBerries", "0"))); - } - catch - { - Debug.LogError("Failed to migrate TotalSlowBerries to new save format"); - } - PlayerPrefs.DeleteKey("TotalSlowBerries"); - } - if (PlayerPrefs.HasKey("TotalUltraBerries")) - { - try - { - SetGameStoreTotalUltraBerries(BigInteger.Parse(PlayerPrefs.GetString("TotalUltraBerries", "0"))); - } - catch - { - Debug.LogError("Failed to migrate TotalUltraBerries to new save format"); - } - PlayerPrefs.DeleteKey("TotalUltraBerries"); - } - if (PlayerPrefs.HasKey("TotalSpeedyBerries")) - { - try - { - SetGameStoreTotalSpeedyBerries(BigInteger.Parse(PlayerPrefs.GetString("TotalSpeedyBerries", "0"))); - } - catch - { - Debug.LogError("Failed to migrate TotalSpeedyBerries to new save format"); - } - PlayerPrefs.DeleteKey("TotalSpeedyBerries"); - } - if (PlayerPrefs.HasKey("TotalAttempts")) - { - try - { - SetGameStoreTotalAttepts(BigInteger.Parse(PlayerPrefs.GetString("TotalAttempts", "0"))); - } - catch - { - Debug.LogError("Failed to migrate TotalAttempts to new save format"); - } - PlayerPrefs.DeleteKey("TotalAttempts"); - } - if (PlayerPrefs.HasKey("pastOverlay")) - { - PlayerPrefs.DeleteKey("pastOverlay"); - } - if (PlayerPrefs.HasKey("gameSession") && PlayerPrefs.GetString("gameSession") != null && PlayerPrefs.GetString("gameSession").Length == 512) - { - try - { - SetAccountSession(PlayerPrefs.GetString("gameSession")); - } - catch - { - Debug.LogError("Failed to migrate gameSession to new save format"); - } - PlayerPrefs.DeleteKey("gameSession"); - } - if (PlayerPrefs.HasKey("userName")) - { - try - { - SetAccountSession(PlayerPrefs.GetString("userName")); - } - catch - { - Debug.LogError("Failed to migrate userName to new save format"); - } - PlayerPrefs.DeleteKey("userName"); - } - if (PlayerPrefs.HasKey("userId")) - { - try - { - SetAccountID(PlayerPrefs.GetInt("userId", 0)); - } - catch - { - Debug.LogError("Failed to migrate userId to new save format"); - } - PlayerPrefs.DeleteKey("userId"); - } - if (PlayerPrefs.HasKey("userId")) - { - try - { - SetAccountID(PlayerPrefs.GetInt("userId", 0)); - } - catch - { - Debug.LogError("Failed to migrate userId to new save format"); - } - PlayerPrefs.DeleteKey("userId"); - } - if (PlayerPrefs.HasKey("musicVolume")) - { - try - { - SetSettingMusicVolume(PlayerPrefs.GetFloat("musicVolume", 1f)); - } - catch - { - Debug.LogError("Failed to migrate musicVolume to new save format"); - } - PlayerPrefs.DeleteKey("musicVolume"); - } - if (PlayerPrefs.HasKey("sfxVolume")) - { - try - { - SetSettingSFXVolume(PlayerPrefs.GetFloat("sfxVolume", 1f)); - } - catch - { - Debug.LogError("Failed to migrate sfxVolume to new save format"); - } - PlayerPrefs.DeleteKey("sfxVolume"); - } - if (PlayerPrefs.HasKey("BirdColor")) - { - try - { - var birdColor = PlayerPrefs.GetString("BirdColor", "255;255;255").Split(";"); - SetColorSettingIcon(new JArray(birdColor[0], birdColor[1], birdColor[2])); - } - catch - { - Debug.LogError("Failed to migrate BirdColor to new save format"); - } - PlayerPrefs.DeleteKey("BirdColor"); - } - if (PlayerPrefs.HasKey("OverlayColor")) - { - try - { - var overlayColor = PlayerPrefs.GetString("OverlayColor", "255;255;255").Split(";"); - SetColorSettingOverlay(new JArray(overlayColor[0], overlayColor[1], overlayColor[2])); - } - catch - { - Debug.LogError("Failed to migrate OverlayColor to new save format"); - } - PlayerPrefs.DeleteKey("OverlayColor"); - } - if (PlayerPrefs.HasKey("OverlayColor")) - { - try - { - var overlayColor = PlayerPrefs.GetString("OverlayColor", "255;255;255").Split(";"); - SetColorSettingOverlay(new JArray(overlayColor[0], overlayColor[1], overlayColor[2])); - } - catch - { - Debug.LogError("Failed to migrate OverlayColor to new save format"); - } - PlayerPrefs.DeleteKey("OverlayColor"); - } - if (PlayerPrefs.HasKey("BackgroundColor")) - { - try - { - var bgColor = PlayerPrefs.GetString("BackgroundColor", "58;58;58").Split(";"); - SetColorSettingOverlay(new JArray(bgColor[0], bgColor[1], bgColor[2])); - } - catch - { - Debug.LogError("Failed to migrate BackgroundColor to new save format"); - } - PlayerPrefs.DeleteKey("BackgroundColor"); - } - if (PlayerPrefs.HasKey("BackgroundColor")) - { - try - { - var bgColor = PlayerPrefs.GetString("BackgroundColor", "58;58;58").Split(";"); - SetColorSettingOverlay(new JArray(bgColor[0], bgColor[1], bgColor[2])); - } - catch - { - Debug.LogError("Failed to migrate BackgroundColor to new save format"); - } - PlayerPrefs.DeleteKey("BackgroundColor"); - } - if (PlayerPrefs.HasKey("icon")) - { - try - { - SetBirdIcon(PlayerPrefs.GetInt("icon", 1)); - } - catch - { - Debug.LogError("Failed to migrate icon to new save format"); - } - PlayerPrefs.DeleteKey("icon"); - } - if (PlayerPrefs.HasKey("overlay")) - { - try - { - SetBirdOverlay(PlayerPrefs.GetInt("overlay", 1)); - } - catch - { - Debug.LogError("Failed to migrate overlay to new save format"); - } - PlayerPrefs.DeleteKey("overlay"); - } - if (PlayerPrefs.HasKey("overlay")) - { - try - { - SetBirdOverlay(PlayerPrefs.GetInt("overlay", 1)); - } - catch - { - Debug.LogError("Failed to migrate overlay to new save format"); - } - PlayerPrefs.DeleteKey("overlay"); - } - if (PlayerPrefs.HasKey("Setting1")) - { - try - { - SetSettingFullScreen(PlayerPrefs.GetInt("Setting1", 1) == 1); - } - catch - { - Debug.LogError("Failed to migrate Setting1 to new save format"); - } - PlayerPrefs.DeleteKey("Setting1"); - } - if (PlayerPrefs.HasKey("Setting2")) - { - try - { - SetSettingShowFPS(PlayerPrefs.GetInt("Setting2", 1) == 1); - } - catch - { - Debug.LogError("Failed to migrate Setting2 to new save format"); - } - PlayerPrefs.DeleteKey("Setting2"); - } - if (PlayerPrefs.HasKey("Setting3")) - { - try - { - SetSettingVsync(PlayerPrefs.GetInt("Setting3", 1) == 1); - } - catch - { - Debug.LogError("Failed to migrate Setting3 to new save format"); - } - PlayerPrefs.DeleteKey("Setting3"); - } - if (PlayerPrefs.HasKey("Setting4")) - { - try - { - SetSettingHideSocials(PlayerPrefs.GetInt("Setting4", 1) == 1); - } - catch - { - Debug.LogError("Failed to migrate Setting4 to new save format"); - } - PlayerPrefs.DeleteKey("Setting4"); - } - } } public void Save() diff --git a/Assets/Scripts/LoadingMenu.cs b/Assets/Scripts/LoadingMenu.cs index 481e634..4c1087e 100644 --- a/Assets/Scripts/LoadingMenu.cs +++ b/Assets/Scripts/LoadingMenu.cs @@ -1,4 +1,3 @@ -using System; using TMPro; using UnityEngine; using UnityEngine.Networking; @@ -25,21 +24,6 @@ public class LoadingMenu : MonoBehaviour Application.targetFrameRate = 360; QualitySettings.vSyncCount = 0; } - if (!PlayerPrefs.HasKey("LegacyConversion")) - { - if (PlayerPrefs.GetString("latestVersion", Application.version) == "1.4.0-beta1") - { - PlayerPrefs.DeleteKey("Setting2"); - PlayerPrefs.DeleteKey("Setting3"); - PlayerPrefs.SetInt("Setting2", PlayerPrefs.GetInt("Setting4", 0)); - PlayerPrefs.SetInt("Setting3", PlayerPrefs.GetInt("Setting5", 0)); - } - if (PlayerPrefs.HasKey("HighScore")) - { - PlayerPrefs.SetString("HighScoreV2", Math.Max(PlayerPrefs.GetInt("HighScore"), 0).ToString()); - PlayerPrefs.DeleteKey("HighScore"); - } - } PlayerPrefs.SetString("latestVersion", Application.version); updateButton.onClick.AddListener(() => { diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index aee44d4..ea36aec 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -69,7 +69,7 @@ PlayerSettings: disableDepthAndStencilBuffers: 0 androidStartInFullscreen: 1 androidRenderOutsideSafeArea: 1 - androidUseSwappy: 1 + androidUseSwappy: 0 androidDisplayOptions: 1 androidBlitType: 0 androidResizeableActivity: 1 @@ -143,7 +143,7 @@ PlayerSettings: loadStoreDebugModeEnabled: 0 visionOSBundleVersion: 1.0 tvOSBundleVersion: 1.0 - bundleVersion: 1.8.3 + bundleVersion: 26.1 preloadedAssets: - {fileID: -944628639613478452, guid: 2bcd2660ca9b64942af0de543d8d7100, type: 3} metroInputSource: 0