예제 #1
0
        protected virtual bool IsUseButtonDown()
        {
            if (DialogueManager.IsDialogueSystemInputDisabled())
            {
                return(false);
            }

            // First check for button down to remember what was selected at the time:
            if (!string.IsNullOrEmpty(useButton) && DialogueManager.getInputButtonDown(useButton))
            {
                clickedDownOn = selection;
            }

            // Check for use key or button (only if releasing button on same selection):
            if ((useKey != KeyCode.None) && InputDeviceManager.IsKeyDown(useKey))
            {
                return(true);
            }
            if (!string.IsNullOrEmpty(useButton))
            {
                if (DialogueManager.instance != null && DialogueManager.getInputButtonDown == DialogueManager.instance.StandardGetInputButtonDown)
                {
                    return(InputDeviceManager.IsButtonUp(useButton) && (selection == clickedDownOn));
                }
                else
                {
                    return(DialogueManager.GetInputButtonDown(useButton));
                }
            }
            return(false);
        }
예제 #2
0
        protected virtual bool IsUseButtonDown()
        {
            if (DialogueManager.IsDialogueSystemInputDisabled())
            {
                return(false);
            }

            // First check for button down to remember what was selected at the time:
            if (!string.IsNullOrEmpty(useButton) && DialogueManager.getInputButtonDown(useButton))
            {
                clickedDownOn = selection;
            }

            // Check for use key or button (only if releasing button on same selection):
            return(((useKey != KeyCode.None) && Input.GetKeyDown(useKey)) ||
                   (!string.IsNullOrEmpty(useButton) && Input.GetButtonUp(useButton) && (selection == clickedDownOn)));
        }
 void Update()
 {
     if (runtimeQuestLogWindow == null)
     {
         return;
     }
     if (DialogueManager.IsDialogueSystemInputDisabled())
     {
         return;
     }
     if (Input.GetKeyDown(key) || (!string.IsNullOrEmpty(buttonName) && DialogueManager.getInputButtonDown(buttonName)))
     {
         if (runtimeQuestLogWindow.isOpen)
         {
             runtimeQuestLogWindow.Close();
         }
         else
         {
             runtimeQuestLogWindow.Open();
         }
     }
 }