public void OnQuit()
    {
        Debug.Log("PauseManager.OnQuit");

        foreach (var quittableComponent in quittableInterfaces)
        {
            IQuittable quittableInterface = (IQuittable)quittableComponent;
            if (quittableInterface != null)
            {
                quittableInterface.OnQuit();
            }
        }
    }
Beispiel #2
0
    public void OnQuit()
    {
        Debug.Log("PauseManager.OnQuit");

        if (gcSurvival.GamePaused && gcSurvival.Score != 0)
        {
            PlayerPrefs.SetInt("GamePaused", 1);
        }
        foreach (var quittableComponent in quittableInterfaces)
        {
            IQuittable quittableInterface = (IQuittable)quittableComponent;
            if (quittableInterface != null)
            {
                quittableInterface.OnQuit();
                btnAudio.Play();
                //SceneManager.LoadScene(0);
            }
        }
    }