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); }