Esempio n. 1
0
        void Awake()
        {
            if (instance != null)
            {
                Destroy(this.gameObject);
                LoadData = false;
                return;
            }
            else
            {
                instance = this;
            }

            DontDestroyOnLoad(this);

            if (LoadData)
            {
                if (PlayerPrefs.GetInt("SS_saveData", 0) == 0)
                {
                    SaveData.newSave();
                }
                else
                {
                    SaveData.load(levels);
                }
                LoadData = false;
            }
            Debug.Log("Language " + (LanguageCode)PlayerPrefs.GetInt("SS_Language", 0));
            Language.CurrentLanguage = (LanguageCode)PlayerPrefs.GetInt("SS_Language", 0);
            ReviewPrompt             = PlayerPrefs.GetInt("SS_ReviewPrompt", 0);
        }
Esempio n. 2
0
 private void Awake()
 {
     if (instance != null)
     {
         Destroy(this.gameObject);
         Destroy(ScrollRect);
         return;
     }
     else
     {
         instance = this;
     }
     DontDestroyOnLoad(this);
     _ls = LevelSelector.instance;
     offScreenPosition       = new Vector3(Screen.width * 2, 0, 0);
     onScreenPosition        = Vector3.zero;
     settingsCanvas.position = offScreenPosition;
     if (LevelSelect != null)
     {
         LevelSelect.Open();
     }
     _clickSound = GetComponent <ClickSound>();
     _canvas     = GetComponent <Canvas>();
 }