Exemple #1
0
    IEnumerator Jump()
    {
        UpdateJumps();
        TimeAdvanceUI.text = "Time flies fast...";
        LockAllButtons();

        for (int x = 1; x <= 20; x++)
        {
            Cam.GetComponent <Camera>().orthographicSize++;
            yield return(new WaitForEndOfFrame());
        }

        audiomanager.PlayAudio("Jump In");

        JumpLight.SetActive(true);
        yield return(new WaitForSeconds(0.25f));

        Playership.SetActive(false);
        yield return(new WaitForSeconds(0.25f));

        JumpLight.SetActive(false);

        yield return(new WaitForSeconds(3));

        UpdateResources();
        AdvanceTime();
        audiomanager.PlayAudio("Jump Out");

        JumpLight.SetActive(true);
        yield return(new WaitForSeconds(0.25f));

        Playership.SetActive(true);
        yield return(new WaitForSeconds(0.25f));

        JumpLight.SetActive(false);

        for (int x = 1; x <= 20; x++)
        {
            Cam.GetComponent <Camera>().orthographicSize--;
            yield return(new WaitForEndOfFrame());
        }

        TimeAdvanceUI.text = "";
        UnlockAllButtons();

        storyManager.ChangeCurrentStory();
    }