Beispiel #1
0
    private void OnGameOver()
    {
        if (mainObjectivesCompleted)
        {
            OpenWindow(objectiveFinishedWindow, LevelPassedConversation);
        }
        else
        {
            // Instantiate a copy of the restart conversation and say it
            GameManager     gameManager         = GameManager.Instance;
            NPCConversation restartConversation = gameManager.LevelData.RestartConversation.InstantiateAndSay();
            gameManager.m_dialogueManager.StartInteractiveConversation();

            // When the conversation ends then show the fail window
            restartConversation.OnConversationEnded(() =>
            {
                OpenWindow(failWindow, () => LevelDataLoader.ReloadLevel(), () => SceneManager.LoadScene("LevelMenu"));
            });
        }
    }
 public void ReloadLevel()
 {
     LevelDataLoader.ReloadLevel();
 }