コード例 #1
0
    public BedroomState[] states; //The states of the bedroom stored by thier state values.

    protected override void OnSceneLoaded(Scene scene, LoadSceneMode mode)
    {
        base.OnSceneLoaded(scene, mode);
        ConfigureBedroom();

        StartCoroutine(OverTime.ChangeOpacity(fadeImage, 255f, 0f, fadeDuration, null));
    }
コード例 #2
0
ファイル: GameEnd.cs プロジェクト: rhystaj/epilogue-scripts
    private IEnumerator EndGame()
    {
        StartCoroutine(OverTime.ChangeOpacity(fade, 1f, 255f, 0.1f, null));
        GetComponent <AudioSource>().Play();
        music.Pause();
        ambience.Pause();

        yield return(new WaitForSeconds(3f));

        Application.Quit();
    }
コード例 #3
0
    /**
     * Load the set transition scene, and unload the current one.
     */
    public virtual void TransitionScenes(bool save)
    {
        if (fadeImage != null)
        {
            StartCoroutine(OverTime.ChangeOpacity(fadeImage, 1f, 255f, 0.1f, null));
        }

        if (toDisable != null)
        {
            toDisable.gameObject.SetActive(false);
        }

        StartCoroutine(PlayClipAndWait(LoadNextScene, save));
    }