コード例 #1
0
    private IEnumerator MyCoroutine(Loader.Scene scene)
    {
        SoundManager.PlaySound(SoundManager.Sound.ButtonClick);
        // yield return new WaitForSeconds(.15f);
        yield return(null);

        Loader.Load(scene);
    }
コード例 #2
0
 private void OnLoadScene(Loader.Scene scene)
 {
     if (anim)
     {
         anim.SetTrigger("crossfade");
     }
     else
     {
         Debug.Log("No animator found");
     }
 }
コード例 #3
0
ファイル: MenuManager.cs プロジェクト: FoxDeath/NordicGameJam
    public void AfterScenario()
    {
        sceneToLoad      = sceneAfterScenario;
        Loader.ClockSkip = true;

        if (text.ToCharArray()[1] == "e".ToCharArray()[0])
        {
            sceneAfterScenario = Loader.Scene.CatchFruit;
        }

        Clock.GoingForward = true;
        loading            = true;
    }
コード例 #4
0
    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);
        }
    }
コード例 #5
0
ファイル: MenuManager.cs プロジェクト: FoxDeath/NordicGameJam
    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;
    }
コード例 #6
0
ファイル: MenuManager.cs プロジェクト: FoxDeath/NordicGameJam
    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;
    }
コード例 #7
0
ファイル: MenuManager.cs プロジェクト: FoxDeath/NordicGameJam
    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;
    }
コード例 #8
0
 public void LoadLevel(Loader.Scene scene)
 {
     Loader.loadScene(scene);
 }
コード例 #9
0
 public void GoToScene(Loader.Scene scene)
 {
     Loader.Load(Loader.Scene.GameScene);
 }