Exemplo n.º 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);
        }
Exemplo n.º 2
0
 void Update()
 {
     if (DialogueManager.IsDialogueSystemInputDisabled())
     {
         return;
     }
     if (Input.GetKeyDown(key) || (!string.IsNullOrEmpty(buttonName) && DialogueManager.GetInputButtonDown(buttonName)))
     {
         var pointer = new PointerEventData(EventSystem.current);
         ExecuteEvents.Execute(button.gameObject, pointer, ExecuteEvents.submitHandler);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Checks whether the player has just pressed the use button.
 /// </summary>
 /// <returns>
 /// <c>true</c> if the use button/key is down; otherwise, <c>false</c>.
 /// </returns>
 protected virtual bool IsUseButtonDown()
 {
     if (DialogueManager.IsDialogueSystemInputDisabled())
     {
         return(false);
     }
     if (enableTouch && IsTouchDown())
     {
         return(true);
     }
     return(((useKey != KeyCode.None) && Input.GetKeyDown(useKey)) ||
            (!string.IsNullOrEmpty(useButton) && DialogueManager.GetInputButtonDown(useButton)));
 }
Exemplo n.º 4
0
 /// <summary>
 /// Checks whether the player has just pressed the use button.
 /// </summary>
 /// <returns>
 /// <c>true</c> if the use button/key is down; otherwise, <c>false</c>.
 /// </returns>
 private bool IsUseButtonDown()
 {
     if (DialogueManager.IsDialogueSystemInputDisabled())
     {
         return(false);
     }
     if (enableTouch && IsTouchDown())
     {
         return(true);
     }
     return(((useKey != KeyCode.None) && Input.GetKeyDown(useKey)) ||
            (!string.IsNullOrEmpty(useButton) && CrossPlatformInputManager.GetButtonUp(useButton)));
 }
Exemplo n.º 5
0
 public void Update()
 {
     if (isAwaitingInput && !DialogueManager.IsDialogueSystemInputDisabled())
     {
         if (Input.GetKeyDown(acceptKey))
         {
             AcceptTextInput();
         }
         else if (Input.GetKeyDown(cancelKey))
         {
             CancelTextInput();
         }
     }
 }
 protected override void Update()
 {
     if (m_isAwaitingInput && !DialogueManager.IsDialogueSystemInputDisabled())
     {
         if (InputDeviceManager.IsKeyDown(acceptKey))
         {
             AcceptTextInput();
         }
         else if (InputDeviceManager.IsKeyDown(cancelKey))
         {
             CancelTextInput();
         }
     }
 }
Exemplo n.º 7
0
        protected 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)));
        }
Exemplo n.º 8
0
 void Update()
 {
     if (DialogueManager.IsDialogueSystemInputDisabled())
     {
         return;
     }
     if (Input.GetKeyDown(key) || (!string.IsNullOrEmpty(buttonName) && DialogueManager.GetInputButtonDown(buttonName)))
     {
         if (questLogWindow.IsOpen)
         {
             questLogWindow.Close();
         }
         else
         {
             questLogWindow.Open();
         }
     }
 }
 void Update()
 {
     if (runtimeQuestLogWindow == null)
     {
         return;
     }
     if (DialogueManager.IsDialogueSystemInputDisabled())
     {
         return;
     }
     if (InputDeviceManager.IsKeyDown(key) || (!string.IsNullOrEmpty(buttonName) && DialogueManager.getInputButtonDown(buttonName)))
     {
         if (runtimeQuestLogWindow.isOpen)
         {
             runtimeQuestLogWindow.Close();
         }
         else
         {
             runtimeQuestLogWindow.Open();
         }
     }
 }