Esempio n. 1
0
    void Start()
    {
        prefsname   = SceneManager.GetActiveScene().name;
        lvlcomplete = "lvl" + SceneManager.GetActiveScene().name.ToLower();
        PlayerPrefs.GetInt(lvlcomplete);
        //Checking if Level is complete
        if (!Cheats.IsOn)
        {
            PlayerPrefs.SetInt(lvlcomplete, 1);
        }
        //Saving number of scene of top-level
        if (!Cheats.IsOn)
        {
            if (PlayerPrefs.GetInt("TopLevel") < SceneManager.GetActiveScene().buildIndex)
            {
                PlayerPrefs.SetInt("TopLevel", SceneManager.GetActiveScene().buildIndex);
            }
        }
        int SaveAttempt = PlayerPrefs.GetInt(prefsname);

        if (SaveAttempt == 0)
        {
            SaveAttempt = 1;
            PlayerPrefs.SetInt(prefsname, SaveAttempt);
        }

        HSprefsname = "HS" + SceneManager.GetActiveScene().name;

        float HSSaveAttempt = PlayerPrefs.GetFloat(HSprefsname);

        ChangingAudio.AudioChange();
    }
Esempio n. 2
0
 // Swich to scene "Menu"
 private void Start()
 {
     ChangingAudio.AudioChange();
 }