// Use this for initialization
    void Start()
    {
        // Grab out LoadIntro component from the main scene
        parentSceneLoader = GameObject.Find("SceneManager").GetComponent <LoadIntro>();

        //Get our percentage
        coralManager = parentSceneLoader.coral.GetComponent <CoralManaging>();
        float percentSaved = coralManager.GetPercentCollectedRounded();

        totalTime     = 0.0f;
        uiTransitions = new List <UITransition>();

        //(UI to display, time to enter, time to leave)
        uiTransitions.Add(new TextTransition(introText, 1.0f, 5.0f));

        //This is a special text, so we change its %
        TextTransition percentText = new TextTransition(introTextTwo, 2.0f, 5.0f);

        percentText.ChangeText(percentSaved + "% of the reef");

        //now add it
        uiTransitions.Add(percentText);

        //last message
        uiTransitions.Add(new TextTransition(finalText, 6.0f, 10.0f));



        // Update is called once per frame
    }
    // Use this for initialization
    void Start()
    {
        // Grab out LoadIntro component from the main scene
        parentSceneLoader = GameObject.Find("SceneManager").GetComponent <LoadIntro>();

        postProcessorScript = parentSceneLoader.coral.postProcessorScript;
        shouldKillReef      = true;
        shouldStartGame     = false;
        //Reset the weight to make it clean again
        postProcessorScript.weight = 0.0f;
        shouldSpawnPreGameTrash    = true;
        CreateSpawnPoints();


        totalTime         = 0.0f;
        uiTransitions     = new List <UITransition>();
        bubbleTransitions = new List <BubbleGroupTransition>();

        //(UI to display, time to enter, time to leave)
        uiTransitions.Add(new TextTransition(introText, 1.0f, 5.0f));
        uiTransitions.Add(new TextTransition(introTextTwo, 2.0f, 5.0f));
        uiTransitions.Add(new TextTransition(descText, 7.0f, 11.0f));
        uiTransitions.Add(new TextTransition(descTextTwo, 12.0f, 16.0f));
        uiTransitions.Add(new TextTransition(prompt, 17.0f, 21.0f));
        //Final prompt happens at 31 seconds. Lets start off with the reef all pretty, then kill it.
        uiTransitions.Add(new TextTransition(final, reefKillTime, 41.0f)); // 31, 35

        //uiTransitions.Add(new ImageTransition(bottle, 23.0f, 30.0f));

        uiTransitions.Add(new TextTransition(bottleText, 22.0f, 25.0f));
        uiTransitions.Add(new TextTransition(bubbleText, 26.0f, 29.0f));
        uiTransitions.Add(new TextTransition(phoneText, 30.0f, 33.0f));

        //Now has a time where it will peak into view
        //first one comes in without the peek, so add it to ui transitions
        uiTransitions.Add(new BubbleGroupTransition(bottle, 22.0f, 34.0f, 24.0f));
        bubbleTransitions.Add(new BubbleGroupTransition(bubble, 26.0f, 34.0f, 22.0f));
        bubbleTransitions.Add(new BubbleGroupTransition(phone, 30.0f, 34.0f, 22.0f));

        /*
         * //Old Transition times
         * uiTransitions.Add(new TextTransition(bottleText, 23.0f, 25.0f));
         * uiTransitions.Add(new TextTransition(bubbleText, 25.0f, 27.0f));
         * uiTransitions.Add(new TextTransition(phoneText, 27.0f, 29.0f));
         *
         * uiTransitions.Add(new BubbleGroupTransition(bottle, 23.0f, 30.0f));
         * uiTransitions.Add(new BubbleGroupTransition(bubble, 25.0f, 30.0f));
         * uiTransitions.Add(new BubbleGroupTransition(phone, 27.0f, 30.0f));
         */


        // Update is called once per frame
    }
예제 #3
0
    void Start()
    {
        gameManager  = GameObject.Find("SceneManager").GetComponent <LoadIntro>();
        startingTime = time;
        timerRunning = false;
        HideUIElements();

        //For progress bar
        progBar  = progressBar.GetComponent <RectTransform>();
        startPos = progBar.transform.position;
        speed    = -0.15f;
    }