IEnumerator StartLoading()
    {
        yield return(new WaitForSecondsRealtime(0.5f));

        if (FileBasedPrefs.HasKey("_restarted_"))
        {
            FileBasedPrefs.DeleteAll();
            FileBasedPrefs.DeleteKey("_restarted_");
        }
        LoadLevel();
    }
示例#2
0
    public void OnMouseDown()
    {
        //mainScreen.SetActive(true);



        //SteamUserStats.ResetAllStats(true);

        FileBasedPrefs.DeleteAll();

        foreach (string achname in bothash.AlbumManager.Instance.albumSO.ACHNAMES)
        {
            FileBasedPrefs.SetInt(achname, 1);
        }

        foreach (GameObject manager in managers)
        {
            Destroy(manager);
        }

        if (Directory.Exists(Application.persistentDataPath + "/GameData"))
        {
            Directory.Delete(Application.persistentDataPath + "/GameData", true);
        }

        if (Directory.Exists(Application.persistentDataPath + "/Inventory"))
        {
            Directory.Delete(Application.persistentDataPath + "/Inventory", true);
        }

        if (Directory.Exists(Application.persistentDataPath + "/PuzzlesData"))
        {
            Directory.Delete(Application.persistentDataPath + "/PuzzlesData", true);
        }
        if (Directory.Exists(Application.persistentDataPath + "/AlbumData"))
        {
            Directory.Delete(Application.persistentDataPath + "/AlbumData", true);
        }


        //FileBasedPrefs.SetInt("_restarted_",1);
        SceneManager.LoadScene(0);
    }
    void Start()
    {
        if (DeleteAtStart)
        {
            FileBasedPrefs.DeleteAll();
        }
        if (SpeedTest)
        {
            for (int i = 0; i < 10; i++)
            {
                FileBasedPrefs.SetString("SpeedTest" + i, "SpeedTest" + i);
            }
            return;
        }

        Invoke("StringTests", 0.25f);
        Invoke("IntTests", 0.5f);
        Invoke("FloatTests", 0.75f);
        Invoke("BoolTests", 1f);
        Invoke("GeneralTests", 1.25f);
    }