示例#1
0
    void InitPuzzle(string command)
    {
        string[] parsedText = DialogReader.ParseBrackets(command);
        Debug.Log("parsed: " + parsedText[0] + "," + parsedText[1]);
        switch (parsedText[0].Trim().ToLower())
        {
        case "thoughtspiral":
            Debug.Log("hasspiral");
            Debug.Log("1:" + parsedText[1]);
            EndPart();
            ThoughtSpiralPuzzle.Initialize(parsedText[1], WinnableScores());
            puzzling = true;
            //_playerController.busy = true;
            _playerController.playerMoving = false;
            _playerController.busy         = true;
            break;

        case "passwordinput":
            Debug.Log("entering password input");
            inputInAction                  = true;
            PasswordInput.activated        = true;
            PasswordInput.inputEnabled     = true;
            _playerController.playerMoving = false;
            _playerController.busy         = true;
            break;

        default:
            Debug.Log("puzzle not found");
            break;
        }
    }
示例#2
0
    void ReformatText(string fullText)      //ugly, edit later
    {
        string[] parsedText = DialogReader.ParseBrackets(fullText);
        if (parsedText[0].Equals(""))
        {
            fullSpanText.enabled   = true;
            speakerTextbox.enabled = false;
            if (speakerBackground != null)
            {
                speakerBackground.SetActive(false);
            }
            fullSpanText.text = parsedText[1];
            currTextUsed      = fullSpanText;
        }
        else
        {
            speakerTextbox.enabled = true;
            speakerTextbox.text    = parsedText[0];
            if (speakerBackground != null)
            {
                speakerBackground.SetActive(true);
            }

            fullSpanText.enabled = true;
            fullSpanText.text    = parsedText[1];
            currTextUsed         = fullSpanText;
        }
    }