FadeToBlack() public method

public FadeToBlack ( ) : void
return void
Ejemplo n.º 1
0
    public void FloorTransition()
    {
        BlackScreen blackScreenComp = blackScreen.GetComponent <BlackScreen>();

        ladderState = LadderStates.Transition;
        StartCoroutine(blackScreenComp.FadeToBlack(0.5f, 0.0f));
        StartCoroutine(blackScreenComp.FadeFromBlack(0.5f, 1.0f));
        Invoke("NextFloor", 1.0f);
        string floorText = "Floor " + (GameObject.Find("TowerManager").GetComponent <LevelManager>().currentFloor + 1).ToString(); // floor + 1 because NextFloor gets called too late.

        StartCoroutine(blackScreenComp.FadeInText(floorText, 0.5f, 1.5f));
        StartCoroutine(blackScreenComp.FadeOutText(0.5f, 2.5f));
    }
Ejemplo n.º 2
0
    public void PlayDeathSequence()
    {
        music.PlayerDead();
        wordDisplay.StopDisplay();
        hero.GetComponent <moveCharacter>().Die();
        GameObject.Find("GameManager").GetComponent <GameManager>().StartZoomIn();

        BlackScreen blackScreenComp = blackScreen.GetComponent <BlackScreen>();

        StartCoroutine(blackScreenComp.FadeInText("THE HERO IS DEAD", 1f, 2f));
        StartCoroutine(blackScreenComp.FadeToBlack(1f, 3.5f));
        StartCoroutine(blackScreenComp.FadeOutText(1f, 5f));

        Invoke("RestartGame", 7f);
    }