예제 #1
0
    void Start()
    {
        if (Tutorial == true)
        {
            dialogue.name = "Shop Assistant";
            dialogueManager.ChangeName(dialogue);
            dialogue.sentences[0] = "Use Arrow Key to move and space to interact";
            dialogue.sentences[1] = "Hello my little pinata!";
            dialogue.sentences[2] = "are you ready to learn how to amaze everyone with your Color-changing ability?";
            dialogue.sentences[3] = "Try to move yourself in front of one of these toys";
            dialogue.sentences[4] = "and press Space to change your color to match the RED TOY";

            StartCoroutine(StartTutorialExplanation());
        }
        StartCoroutine(ColorSelection());
    }
예제 #2
0
    IEnumerator DialogueGameOver()
    {
        yield return(new WaitForSeconds(1f));

        TriggerDialogue();
        yield return(new WaitForSeconds(5f));

        dialogueManager.DisplayNextSentence();
        yield return(new WaitForSeconds(5f));

        dialogueManager.DisplayNextSentence();
        yield return(new WaitForSeconds(5f));

        FontTextMiguel       = FontStyle.Bold;
        MiguelText.fontStyle = FontTextMiguel;
        MiguelText.color     = Color.red;
        MiguelText.fontSize  = 40;
        dialogueManager.DisplayNextSentence();
        yield return(new WaitForSeconds(5f));

        Texts[0].SetActive(false);
        Texts[1].SetActive(false);
        Background.SetActive(false);
        beating.SetActive(true);
        yield return(new WaitForSeconds(2f));

        beating.SetActive(false);
        Chameleon.SetActive(true);
        yield return(new WaitForSeconds(0.5f));

        HeadRigidbody.gravityScale = 1;
        yield return(new WaitForSeconds(1f));

        TailsRB[0].gravityScale = 1;
        yield return(new WaitForSeconds(0.5f));

        TailsRB[1].gravityScale = 1;
        yield return(new WaitForSeconds(2f));

        Chameleon.SetActive(false);
        Death.SetActive(true);
        DeathSprite.SetActive(true);
        dialogue.name = "Shop Keeper";
        dialogueManager.ChangeName(dialogue);
        dialogueManager.DisplayNextSentence();
        Texts[0].SetActive(true);
        Texts[1].SetActive(true);
        FontTextMiguel       = FontStyle.Normal;
        MiguelText.fontStyle = FontTextMiguel;
        MiguelText.color     = Color.white;
        MiguelText.fontSize  = 30;
        yield return(new WaitForSeconds(3f));

        dialogueManager.DisplayNextSentence();
    }