private bool HandleSwipeGesture() { this.m_swipeRect = CameraUtils.CreateGUIScreenRect(Camera.main, (Component)this.m_upperLeftBone, (Component)this.m_lowerRightBone); if (UniversalInputManager.Get().GetMouseButtonDown(0) && this.InSwipeRect(UniversalInputManager.Get().GetMousePosition())) { this.m_checkingPossibleSwipe = true; this.m_swipeDetectTimer = 0f; this.m_swipeStart = UniversalInputManager.Get().GetMousePosition(); this.m_swipeElement = PegUI.Get().FindHitElement(); return(true); } if (this.m_checkingPossibleSwipe) { this.m_swipeDetectTimer += UnityEngine.Time.deltaTime; if (UniversalInputManager.Get().GetMouseButtonUp(0)) { this.m_checkingPossibleSwipe = false; if ((!this.CheckSwipe() && (this.m_swipeElement != null)) && (this.m_swipeElement == PegUI.Get().FindHitElement())) { this.m_swipeElement.TriggerPress(); this.m_swipeElement.TriggerRelease(); } return(true); } if (this.m_swipeDetectTimer < 0.1f) { return(true); } this.m_checkingPossibleSwipe = false; if (this.CheckSwipe()) { return(true); } if (this.m_swipeElement != null) { PegUI.Get().DoMouseDown(this.m_swipeElement, this.m_swipeStart); } } return(false); }