public void ChangeFlows(SceneNames _flowToLoad)
 {
     flowInitialized = false;
     currentFlow.CloseFlow();
     currentFlow = CreateFlow(_flowToLoad);
     SceneManager.sceneLoaded += SceneLoaded;
 }
Esempio n. 2
0
    //Change the currentFlow
    public void ChangeFlows(SceneNames flowToLoad)
    {
        flowInitialized = false;
        //Close the currentFlow
        currentFlow.CloseFlow();
        //Create new flow
        currentFlow = CreateFlow(flowToLoad);


        //Add the function to the event
        SceneManager.sceneLoaded += OnSceneLoaded;
        SceneManager.LoadSceneAsync(flowToLoad.ToString());
    }