// Start is called before the first frame update
    void Start()
    {
        promotionUI.EnableUI(false, false);
        currentRequestIndex = -1;

        initialTextWidth = progressBartText.rectTransform.rect.width;

        for (int i = 0; i < documents.Length; i++)
        {
            documents[i].Target = domains[i];
        }

        foreach (GameObject g in characters)
        {
            g.SetActive(false);
        }

        SetScore();
        NewRequest(0, 0);
    }
示例#2
0
    // Start is called before the first frame update
    void Start()
    {
        advanceUI = promotionUI.GetComponent <AdvanceUI>();
        advanceUI.EnableUI(false, false);

        equivalenceUIText.text = equivalenceText.text;

        initialTextWidth = progressBartText.rectTransform.rect.width;

        for (int i = 0; i < sortingBoxObjects.Length; i++)
        {
            sortingBoxObjects[i].GetComponent <SorterBehavior>().Target = domains[i];
            sortingBoxText[i].text = "Forward\nTo\n" + domains[i].ToLower();
        }

        foreach (GameObject g in characters)
        {
            g.SetActive(false);
        }

        SetScore();
        NewRequest(2, 0, 0);
    }
示例#3
0
    void Promote()
    {
        promotionHeader.text = "You've been promoted!";
        string line = "You've been recognized for your efforts and have been promoted to the\n\n\n\nYou may stay and practice the ## protocol or you may advance to the next office.";

        string[] parts = certificateText.text.Split('\n');

        string currentProtocol    = parts[0];
        string nextOfficeLocation = parts[1];
        string staySubtextLine1   = parts[2];
        string staySubtextLine2   = parts[3];
        string staySubtextString  = "";

        Debug.Log(staySubtextLine2);
        if (!string.IsNullOrEmpty(staySubtextLine2))
        {
            staySubtextString = staySubtextLine1 + "\n" + staySubtextLine2;
        }
        else
        {
            staySubtextString = staySubtextLine1;
        }

        string advanceSubtextLine1  = "Proceed To";
        string advanceSubtextLine2  = nextOfficeLocation;
        string advanceSubtextString = "";

        Debug.Log(advanceSubtextLine2);
        if (!string.IsNullOrEmpty(advanceSubtextLine2))
        {
            advanceSubtextString = advanceSubtextLine1 + "\n" + advanceSubtextLine2;
        }
        else
        {
            advanceSubtextString = advanceSubtextLine1;
        }

        line = line.Replace("##", currentProtocol);
        promotionTextLocation.text = nextOfficeLocation;
        staySubtext.text           = staySubtextString;
        advanceSubtext.text        = advanceSubtextString;

        if (ThisLevel == DNSLevel.TopLevel)
        {
            nextOfficeLocation = "Expand Company";

            promotionHeader.text = "Thanks For Playing";
            line = "This game was created by Casey Lafferty as part of his master's research in gamification under the advisement of Dr. Stephen Cooper.\n\nHuman characters:\nCurt - cjc83486 - https://opengameart.org/content/rpg-character\nSogomn - https://opengameart.org/content/animated-character\ndbhvk - https://opengameart.org/content/character-sprite-walk-animation\narikel - https://opengameart.org/content/2d-rpg-character-walk-spritesheet\nAll other game assets were created by Casey.";
            promotionTextLocation.text = "";
            staySubtext.text           = "Proceed to\nMain Menu";
            advanceSubtext.text        = "Quit to\nDesktop";
        }

        advanceUI.SetAdvanceButtonText("Advance To " + nextOfficeLocation);

        promotionText.text = line;

        advanceUI.EnableUI(true, false);
        waitingToAdvance = true;
        SortingAttempt.Reset();
        SetScore();
    }