Ejemplo n.º 1
0
    //this is the third cutscene of the game. It sets the scene and tells the player how to save
    //their Grandblob
    public void LibraryCutscene()
    {
        //change background so text will show up
        Image fadeImage = GameObject.Find("FadeImage").GetComponent <Image>();

        fadeImage.color = new Color32(255, 255, 225, 50);

        Cursor.visible = false;

        GameObject UICanvas = GameObject.Find("UICanvas");
        UI         uiScript = UICanvas.GetComponent <UI>();

        uiScript.setSkip(false);

        //Print library scene
        string [] messages = new string[9];
        messages [0] = "Hello there. You look worried.";
        messages [1] = "I am! My Grandblob is FROZEN.";
        messages [2] = "That's terrible. It must be Blobothermia, from the temperature.";
        messages [3] = "Is there anything I can do to save him?";
        messages [4] = "...Well, perhaps. There is a legend that certain plants around the world" +
                       " can be collected and planted to change the temperature.";
        messages [5] = "If I collect those plants, can I save my Grandblob?";
        messages [6] = "I would imagine so. Look, in that lake just near me... A plant.";
        messages [7] = "";
        messages [8] = "Collect all the plants around the world.";

        //create times array
        int[] times = new int[9];
        times [0] = 3;
        times [1] = 3;
        times [2] = 4;
        times [3] = 3;
        times [4] = 5;
        times [5] = 3;
        times [6] = 4;
        times [7] = 3;
        times [8] = 3;

        //change color based on dialogue
        Color[] colors = new Color[9];

        //set dialogue colors
        Color libraryColor = new Color32(118, 78, 31, 255);
        Color blobColor    = new Color32(0, 244, 225, 255);

        colors [0] = libraryColor;
        colors [1] = blobColor;
        colors [2] = libraryColor;
        colors [3] = blobColor;
        colors [4] = libraryColor;
        colors [5] = blobColor;
        colors [6] = libraryColor;
        colors [7] = libraryColor;
        colors [8] = Color.white;

        StartCoroutine(uiScript.specialWait(messages, times, colors));

        //disable the cutscene now that it has played
        Blobrarian scriptLibrary = GameObject.Find("Blobrarian").GetComponent <Blobrarian> ();

        scriptLibrary.setCutscene(false);
    }
Ejemplo n.º 2
0
    //grandpaCutscene is the second cutscene of the game. It is a conversation between Grandblob and
    //the player blob.
    public void grandpaCutscene()
    {
        //change background so text will show up
        Image fadeImage = GameObject.Find("FadeImage").GetComponent <Image>();

        fadeImage.color = new Color32(255, 255, 225, 50);

        Cursor.visible = false;

        GameObject UICanvas = GameObject.Find("UICanvas");
        UI         uiScript = UICanvas.GetComponent <UI>();

        uiScript.setSkip(false);

        //Print grandblob scene
        string [] messages = new string[9];
        messages [0] = "Grandblob! I found you!";
        messages [1] = "H-h-hello t-t-t-here...";
        messages [2] = "Grandblob? Are you okay?";
        messages [3] = "I'm just... So... C-c-c-old...";
        messages [4] = "Grandblob, you don't look so good...";
        messages [5] = "......................................";
        messages [6] = "Grandblob! Nooo! You're frozen!!!";
        messages [7] = "";
        messages [8] = "Go find someone to help!";


        //create times array
        int[] times = new int[9];
        for (int i = 0; i < times.Length; i++)
        {
            times [i] = 3;
        }

        //change color based on dialogue
        Color[] colors = new Color[9];

        //set dialogue colors
        Color grandblobColor = new Color32(1, 12, 255, 255);
        Color blobColor      = new Color32(0, 244, 225, 255);

        colors [0] = blobColor;
        colors [1] = grandblobColor;
        colors [2] = blobColor;
        colors [3] = grandblobColor;
        colors [4] = blobColor;
        colors [5] = grandblobColor;
        colors [6] = blobColor;
        colors [7] = grandblobColor;
        colors [8] = Color.white;

        StartCoroutine(uiScript.specialWait(messages, times, colors));

        TalkToGrandpa script = GameObject.Find("grandpa").GetComponent <TalkToGrandpa> ();

        script.setCutscene(false);

        //activate the next cutscene
        Blobrarian scriptLibrary = GameObject.Find("Blobrarian").GetComponent <Blobrarian> ();

        scriptLibrary.setCutscene(true);
    }