void OnApplicationQuit() { CustomPlayerPrefs.SetBool("isMaskFlipped", isFlipped, true); CustomPlayerPrefs.SetFloat("maskScale", maskScale, true); CustomPlayerPrefs.SetInt("selectedMaskID", selectedMaskID, true); CustomPlayerPrefs.SetFloat("maskAlpha", maskMat.GetColor("_Color").a, true); CustomPlayerPrefs.SetFloat("maskColor_R", maskMat.GetColor("_Color").r, true); CustomPlayerPrefs.SetFloat("maskColor_G", maskMat.GetColor("_Color").g, true); CustomPlayerPrefs.SetFloat("maskColor_B", maskMat.GetColor("_Color").b, true); }
private void SaveGameOptions(IGameOptions gameOptions) { CustomPlayerPrefs.SetBool(StringConstants.PlayerPrefsKeys.IsSoundOn, gameOptions.IsSoundOn); CustomPlayerPrefs.SetBool(StringConstants.PlayerPrefsKeys.IsMusicOn, gameOptions.IsMusicOn); }
private void SaveUserStats(IUserStats userStats) { CustomPlayerPrefs.SetBool(StringConstants.PlayerPrefsKeys.FirstSession, userStats.IsFirstSession); CustomPlayerPrefs.SetInt(StringConstants.PlayerPrefsKeys.TutorialStage, userStats.TutorialStage); }