private IEnumerator MyCoroutine(Loader.Scene scene) { SoundManager.PlaySound(SoundManager.Sound.ButtonClick); // yield return new WaitForSeconds(.15f); yield return(null); Loader.Load(scene); }
private void OnLoadScene(Loader.Scene scene) { if (anim) { anim.SetTrigger("crossfade"); } else { Debug.Log("No animator found"); } }
public void AfterScenario() { sceneToLoad = sceneAfterScenario; Loader.ClockSkip = true; if (text.ToCharArray()[1] == "e".ToCharArray()[0]) { sceneAfterScenario = Loader.Scene.CatchFruit; } Clock.GoingForward = true; loading = true; }
public void LoadWorld() { string data = SaveSystem.Load(environementName); if (data != null) { saveObject = JsonUtility.FromJson <SaveData> (data); Loader.Scene currentScene = Loader.getCurrentScene(); StartCoroutine(setEnv(saveObject.env)); RessouceGenerator.listSavedRessource = saveObject.listRessource; InventoryPlayer.setSavedInventory(saveObject.inventoryPlayer); QuestManager.SetSavableData(saveObject.questPlayer); } }
IEnumerator GiveUpBehaviour() { //text = "That's right, give up."; //yield return StartCoroutine(TypeSentence()); //TurnButtons(false); //yield return new WaitForSeconds(2f); yield return(null); sceneToLoad = Loader.Scene.MainMenu; Clock.GoingForward = false; loading = true; canClickButton = true; }
IEnumerator ContinueBehaviour() { //text = "Sure, go on. You will fail eventually."; //yield return StartCoroutine(TypeSentence()); //TurnButtons(false); //yield return new WaitForSeconds(2f); yield return(null); string sceneName = SceneManager.GetActiveScene().name; switch (sceneName) { case "CatchFruit": sceneAfterScenario = Loader.Scene.CrossRoad; sceneToLoad = Loader.Scene.ScenarioPrint; Clock.GoingForward = true; loading = true; break; case "CrossRoad": sceneAfterScenario = Loader.Scene.OfficePacMan; sceneToLoad = Loader.Scene.ScenarioPrint; Clock.GoingForward = true; loading = true; break; case "OfficePacman": sceneAfterScenario = Loader.Scene.MainMenu; sceneToLoad = Loader.Scene.ScenarioPrint; Clock.GoingForward = true; loading = true; break; } canClickButton = true; }
IEnumerator TryAgainBehaviour() { canClickButton = false; //text = "You probably won't make it this time again."; //yield return StartCoroutine(TypeSentence()); //TurnButtons(false); //yield return new WaitForSeconds(2f); yield return(null); string sceneName = SceneManager.GetActiveScene().name; switch (sceneName) { case "CatchFruit": sceneToLoad = Loader.Scene.CatchFruit; Clock.GoingForward = false; loading = true; break; case "CrossRoad": sceneToLoad = Loader.Scene.CrossRoad; Clock.GoingForward = false; loading = true; break; case "OfficePacman": sceneToLoad = Loader.Scene.OfficePacMan; Clock.GoingForward = false; loading = true; break; } canClickButton = true; }
public void LoadLevel(Loader.Scene scene) { Loader.loadScene(scene); }
public void GoToScene(Loader.Scene scene) { Loader.Load(Loader.Scene.GameScene); }