Esempio n. 1
0
    // Shows the survey complete UI elements and generates the back button text
    void ShowEndSceneUI(string cause)
    {
        if (!endSceneUI.IsActive())
        {
            endSceneUI.gameObject.SetActive(true);
            int    backTextListLength = backTextList.Count;
            string backRandText1      = backTextList[UnityEngine.Random.Range(0, backTextListLength)];
            string backRandText2      = backTextList[UnityEngine.Random.Range(0, backTextListLength)];
            backButtonText.text = "Back for " + backRandText1 + " and " + backRandText2;

            if (string.Equals(cause, "WIN"))
            {
                endSceneBannerText.text = "TASK COMPLETE!";
                int    resetTextListLength = resetTextList.Count;
                string resetRandText       = resetTextList[UnityEngine.Random.Range(0, backTextListLength)];
                resetButtonText.text = "Too " + resetRandText + ", refly!";
            }
            else if (string.Equals(cause, "FAIL"))
            {
                endSceneBannerText.text = "TASK ABORTED";
            }
            else if (string.Equals(cause, "PAUSE"))
            {
                //                    /-\___/-\
                // THERE IS NO PAUSE    |̌' ̌'|
                //                       \"/
            }
        }
    }