Ejemplo n.º 1
0
    IEnumerator StartGame()
    {
        nextSentenceButton.SetActive(false);
        LeanTween.alpha(character, 0f, 0.2f);
        LeanTween.moveY(character, -7.63f, 0.2f);
        LeanTween.alpha(enemy, 0f, 0.2f);
        LeanTween.moveY(enemy, -7.63f, 0.2f);
        yield return(new WaitForSeconds(0.2f));

        character.SetActive(false);
        LeanTween.alphaCanvas(levelText.gameObject.GetComponent <CanvasGroup>(), 0f, 0.3f);
        LeanTween.alphaCanvas(messageText.gameObject.GetComponent <CanvasGroup>(), 0f, 0.3f);
        LeanTween.alphaCanvas(nameText.gameObject.GetComponent <CanvasGroup>(), 0f, 0.3f);
        yield return(new WaitForSeconds(0.3f));

        levelText.gameObject.SetActive(false);
        messageText.gameObject.SetActive(false);
        nameText.gameObject.SetActive(false);
        LeanTween.moveY(upbar, 8.97f, 0.2f);
        LeanTween.moveY(downbar, -19.77f, 0.2f);
        yield return(new WaitForSeconds(0.2f));

        loadLevel.StartGame();
    }