void Update()
 {
     switch (PredefinedScene.GetScene(MainManager.ActiveSceneName))
     {
     case SceneEnum.Game:
         // TODO: Implement a proper Pause UI with quit button
         if (Input.GetButtonDown("Cancel"))
         {
             QuitGame();
         }
         break;
     }
 }
Exemplo n.º 2
0
    private IEnumerator UnmuteSceneLayer(Scene scene)
    {
        while (!AudioLayersManager.InitializedAudioLayers)
        {
            yield return(new WaitForSeconds(0.1f));
        }

        AudioLayersManager.Instance.Reset();

        switch (PredefinedScene.GetScene(scene.name))
        {
        case SceneEnum.MainMenu:
            AudioLayersManager.Instance.Unmute("MainMenu-Loop");
            break;

        case SceneEnum.Game:
            AudioLayersManager.Instance.Unmute("Gameplay-Loop");
            break;
        }
    }