Esempio n. 1
0
    /// <summary>
    /// Interaction with the door to lose the game
    /// </summary>
    /// <returns>The interaction.</returns>
    private IEnumerator Door_Interaction()
    {
        //	Perform the interaction
        //ChangeInState.SetRoomState(END_PARTY_STATE.LOSE);
        GameManager.instance.data.endPartyState = END_PARTY_STATE.LOSE;

        PlayerNotoriety.ResetPlayerNoteriety();
        UnityEngine.SceneManagement.SceneManager.LoadScene(1);

        //	**************************
        //	Animate!
        //	**************************

        yield return(null);

        _isBeingInteractedWith = false;
    }
    private IEnumerator Wake_Up()
    {
        _innerThoughts.text = "No... they hate me... I can't... no more please...";
        while (_thoughtBubble.alpha < 1f)
        {
            _blackScreen.color    = new Color(0, 0, 0, _blackScreen.color.a + Time.deltaTime);
            _thoughtBubble.alpha += Time.deltaTime;
            yield return(new WaitForSeconds(Time.deltaTime));
        }
        yield return(new WaitForSeconds(2f));

        while (_thoughtBubble.alpha > 0f)
        {
            _stereo.volume       -= Time.deltaTime * 3.0f;
            _crowd.volume        -= Time.deltaTime * 3.0f;
            _thoughtBubble.alpha -= Time.deltaTime;
            yield return(new WaitForSeconds(Time.deltaTime));
        }
        PlayerNotoriety.ResetPlayerNoteriety();
        _audio.PlayOneShot(_fallingSound, 4.0f);
        SceneManager.LoadScene(1);
    }