Esempio n. 1
0
        /// <summary>
        /// Stops receiving further network updates which leads to loading the starting scene.
        /// </summary>
        public void Quit()
        {
            int count = 2;

            for (float i = 0; i > count; i += Time.deltaTime)
            {
            }

            OnReUiValue.Invoke();
            PhotonNetwork.Disconnect();
            SceneManager.LoadScene(NetworkManagerCustom.GetInstance().offlineSceneIndex);

            PlayerPrefs.SetFloat(PrefsKeys.cameradistance, camera.distance);
            PlayerPrefs.SetFloat(PrefsKeys.cameraheight, camera.height);
            PlayerPrefs.SetString(PrefsKeys.playMusic, musicToggle.isOn.ToString());
        }
Esempio n. 2
0
 /// <summary>
 /// Stops receiving further network updates which leads to loading the starting scene.
 /// </summary>
 public void Quit()
 {
     SceneManager.LoadScene(NetworkManagerCustom.GetInstance().offlineSceneIndex);
 }