/// <summary>Reset All and clear from player prefs</summary> /// Delete All LevN_ player prefs keys public static void ResetAll() { GameManager.Instance.PrimoAvvio = false; SocialConnection.DeleteUserFormDatabase(); //Cancella tutti i dati del setting PlayerPrefs.DeleteKey(GameManager.Instance.AppName + "_PrimoAvvio"); PlayerPrefs.DeleteKey(GameManager.Instance.AppName + "_SoundsVolume"); PlayerPrefs.DeleteKey(GameManager.Instance.AppName + "_MusicVolume"); PlayerPrefs.DeleteKey(GameManager.Instance.AppName + "_Language"); PlayerPrefs.DeleteKey(GameManager.Instance.AppName + "_UIScale"); PlayerPrefs.DeleteKey(GameManager.Instance.AppName + "_Quality"); PlayerPrefs.DeleteKey(GameManager.Instance.AppName + "_AllLevelsOpen"); for (int i = 0; i < 100; i++) { PlayerPrefs.DeleteKey(GameManager.Instance.AppName + "_GemsIDGeted_" + i); } W_GemManager._istance.PlayerGems = Instance.NewUserGems; PlayerPrefs.DeleteKey(GameManager.Instance.AppName + "_Gems_");//Cancella le gemme da disco //Reimposta la lingua di sistema if (Application.systemLanguage.ToString() == "English") { GameManager.Instance.lang = GameManager.Lang.English; } else if (Application.systemLanguage.ToString() == "Italian") { GameManager.Instance.lang = GameManager.Lang.Italian; } print("Apply default language: <color=withe>" + Application.systemLanguage + "</color>"); //Chiude il DialogBox01 MainMenu.AreYourSureDialog.SetActive(false); //Per ogni livello foreach (W_SceneItem allLevels in MainMenu.Instance.AllLevels) { ////Cancella tutti i dati LevN_ PlayerPrefs.DeleteKey(GameManager.Instance.AppName + "LevN_" + allLevels.LevelNumber); } PlayerPrefs.DeleteAll();//Cancella tutto il PlayerPrefsù }
void Awake() { if (instance != null) { Destroy(transform.root.gameObject); return; } else { DontDestroyOnLoad(transform.root.gameObject); instance = this; } MessageInfo = GameObject.Find("_Messages"); if (MessageInfo) { MessageInfo.SetActive(false); } // print("<color=#FFFFFF>Device ID:" + SystemInfo.deviceUniqueIdentifier + "</color>"); }
public void UpdateConnection(SocialConnection connection) { _context.Entry(connection).State = EntityState.Modified; _context.SaveChanges(); }