protected IEnumerator checkDelayedContentTouch() { yield return(new WaitForSeconds(CONTENT_TOUCH_DELAY)); if (_isDragging && Mathf.Abs(_deltaTouch) < TOUCH_MAX_DELTA_FOR_ACTIVATION) { var fixedTouchPosition = new Vector2(_lastTouch.position.x, Screen.height - _lastTouch.position.y); _activeTouchable = getButtonForScreenPosition(fixedTouchPosition); if (_activeTouchable != null) { _activeTouchable.onTouchBegan(_lastTouch, fixedTouchPosition); } } }
protected IEnumerator checkDelayedContentTouch() { yield return new WaitForSeconds( CONTENT_TOUCH_DELAY ); if( _isDragging && Mathf.Abs( _deltaTouch ) < TOUCH_MAX_DELTA_FOR_ACTIVATION ) { var fixedTouchPosition = new Vector2( _lastTouch.position.x, Screen.height - _lastTouch.position.y ); _activeTouchable = getButtonForScreenPosition( fixedTouchPosition ); if( _activeTouchable != null ) _activeTouchable.onTouchBegan( _lastTouch, fixedTouchPosition ); } }