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));
    }
Ejemplo n.º 2
0
    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();
    }
Ejemplo n.º 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));
    }