예제 #1
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);
    }
예제 #2
0
 public void OnTextCompleted(int wordLength)
 {
     if (encouragePhrase.Count > 0)
     {
         wordDisplay.NewText(ladder.transform, encouragePhrase[0]);
         encouragePhrase.RemoveAt(0);
     }
     else
     {
         wordDisplay.StopDisplay();
         ladderState = LadderStates.ClimbingLadder;
         hero.GetComponent <moveCharacter>().Climb();
     }
 }