Exemplo n.º 1
0
    void HideInputField(Dialogue.ResponseType responseType)
    {
        switch (responseType)
        {
        case Dialogue.ResponseType.FreeResponse:
            // if ResponseType.FreeResponse, remove input text field
            inputField.gameObject.SetActive(false);
            break;

        case Dialogue.ResponseType.MultipleChoice:
            // if ResponseType.MultipleChoice, remove multiple choices
            yesOrNo.SetActive(false);
            break;

        case Dialogue.ResponseType.None:
            if (continueArrow.transform.GetChild(0).gameObject.activeSelf == true)
            {
                continueArrow.transform.GetChild(0).gameObject.SetActive(false);     // remove "click to continue prompt"
            }
            if (continueArrow.activeInHierarchy == true)
            {
                continueArrow.SetActive(false);
            }
            break;
        }
    }
Exemplo n.º 2
0
    IEnumerator ShowInputField(Dialogue.ResponseType responseType)
    {
        yield return(new WaitUntil(() => !textManager.IsAnimating()));

        yield return(new WaitUntil(() => !animatorManager.IsAnimating()));

        switch (responseType)
        {
        case Dialogue.ResponseType.FreeResponse:
            // if ResponseType.FreeResponse, set up input text field
            textManager.DisableDisplayInteractability();
            inputField.gameObject.SetActive(true);
            inputField.ActivateInputField();
            inputField.text = "";
            break;

        case Dialogue.ResponseType.MultipleChoice:
            // if ResponseType.MultipleChoice, set up multiple choices
            break;

        case Dialogue.ResponseType.None:
            // if ResponseType.None and no wait time (== -1f), set up continue button
            continueArrow.SetActive(true);
            break;
        }
    }