MissionControl.displayChallengeDescription C# (CSharp) Method

displayChallengeDescription() private method

private displayChallengeDescription ( ) : void
return void
    private void displayChallengeDescription()
    {
        currentDescription = currentChallenge.Value.challengeDescription;

        int length = currentDescription.Length;
        int maxChars = LINEHEIGHT * LINELENGTH;
        int range = maxChars - length;
        descriptionIndex = (int)Math.Floor(UnityEngine.Random.value * (range - 3) + 3);

        //int numberOfNewLine = (length + (descriptionIndex % LINELENGTH)) / LINELENGTH;
        ////int someIndex = descriptionIndex % LINELENGTH;
        ////int insertPos = LINELENGTH - someIndex;
        ////currentDescription = currentDescription.Insert(insertPos, "\n");

        ////Debug.Log(numberOfNewLine);

        //int overhead = -1;
        //int charsAdded = 0;
        //for (int i = 0; i < numberOfNewLine; ++i)
        //{
        //    int insertPos = LINELENGTH - (descriptionIndex % LINELENGTH) + 1;
        //    currentDescription = currentDescription.Insert(insertPos+++overhead, "\n");
        //    charsAdded += insertPos;
        //}

        //if (currentDescription != null) Destroy(currentDescription);

        // TODO: if not the first challenge, move the current message down
        //currentDescription = currentChallenge.Value.challengeDescription;

        // Vector3 size = challengeTextPrefab.GetComponent<MeshRenderer>().bounds.size;
        // Vector3 spawnLocation = computerScreen.transform.position;


        // MeshRenderer computerRend = computerScreen.GetComponent<MeshRenderer>();
        // MeshRenderer messageRend = challengeTextPrefab.GetComponent<MeshRenderer>();

        // scale the message
        // message.transform.localScale = computerScreen.GetComponent<Renderer>().bounds.size;

        // Move the message
        //spawnLocation += -computerScreen.transform.right * messageRend.bounds.size.x / 2;// + computerRend.bounds.size.x / 2 * -computerScreen.transform.right;
        // spawnLocation += computerScreen.transform.forward * computerRend.bounds.size.y / 2 - computerScreen.transform.forward * messageRend.bounds.size.y / 2;
        // spawnLocation += computerScreen.transform.up * 0.001f;

        // currentDescription = (GameObject)Instantiate(challengeTextPrefab, spawnLocation, computerScreen.transform.rotation);
        //currentDescription.transform.GetChild(0).GetComponent<TextMesh>().text = description;
    }