Esempio n. 1
0
        private void Select()
        {
            if (state == MessengerState.PickAnswer && choicePanel.selected >= 0)
            {
                if (currentDialog.choices[choicePanel.selected].dialogId == -1)
                {
                    End();
                    return;
                }

                if (quickRestart && currentDialog.choices[choicePanel.selected].dialogId == 0)
                {
                    currentDialogueId = previousDialogueId;
                    currentDialog     = conv.dialogs[currentDialogueId];
                    currentPhraseId   = currentDialog.phrases.Count;
                }
                else
                {
                    previousDialogueId = currentDialogueId;
                    currentDialogueId  = currentDialog.choices[choicePanel.selected].dialogId;
                    currentDialog      = conv.dialogs[currentDialogueId];
                }
            }

            Next();
        }
Esempio n. 2
0
        private void Start()
        {
            textInput.SetTxt("");

            currentDialog   = conv.dialogs[0];
            currentPhraseId = 0;

            Next();
        }
Esempio n. 3
0
        private void Update()
        {
            if (!busy)
            {
                if (waitForInput && Input.GetKeyDown(KeyCode.F2))
                {
                    waitForInput    = false;
                    currentDialog   = conv.dialogs[30];
                    currentPhraseId = 2;
                    Next();
                    //End();
                }
                else if (Input.GetButtonDown("Vertical") || inputs.buttonDown || inputs.buttonUp)
                {
                    Move(Input.GetAxis("Vertical") > 0 ? "up" : "down");
                }

                /*else if (Input.GetButtonDown("Left"))
                 * {
                 *  Move("left");
                 * }
                 * if (Input.GetButtonDown("Up"))
                 * {
                 *  Move("up");
                 * }
                 * else if (Input.GetButtonDown("Down"))
                 * {
                 *  Move("down");
                 * }*/

                if (Input.GetButtonDown("Fire") && waitForInput)
                {
                    waitForInput = false;
                    Select();
                }

                /*else if (Input.GetButtonDown("Back"))
                 * {
                 *  waitForInput = false;
                 *  Back();
                 * }*/
            }
        }