Exemple #1
0
    void Awake()
    {
        Debug.Log("Loading NarrationSceneController");
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(gameObject);
        }

        if (DataManager.instance.CurrentState.CurrentScene == null)
        {
            currentScene = new Narration_Intro();
            DataManager.instance.CurrentState.CurrentScene = currentScene.SceneName;
        }
        else
        {
            currentScene = SceneFinder.GetSceneFromName(DataManager.instance.CurrentState.CurrentScene);
        }
    }
Exemple #2
0
    public void Awake()
    {
        Debug.Log("Loading DialogueSceneController");
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(gameObject);
        }

        if (DataManager.instance.CurrentState.CurrentScene == null)
        {
            //Debug.Log("No scene to play. Returning to Title.");
            //DataManager.instance.LoadNextScene(new TitleScene());
            Debug.Log("Playing test scene");
            _currentScene = SceneFinder.GetSceneFromName("TestScene");
        }
        else
        {
            _currentScene = SceneFinder.GetSceneFromName(DataManager.instance.CurrentState.CurrentScene);
        }
    }
Exemple #3
0
 public void SetUpOnClick(ISceneClass nextScene, string[][] dialogue)
 {
     NextScene = nextScene;
     Dialogue  = dialogue;
 }
Exemple #4
0
 public void LoadNextScene(ISceneClass scene)
 {
     CurrentState.CurrentScene = scene.SceneName;
     SceneManager.LoadScene(scene.SceneType.ToString());
 }