private bool IsHighPriorityGestureActiving(CocoGestureType gestureType) { CocoTouchPriorityConfigData data = _gestureConfigDataDic.GetValue(gestureType); if (data == null) { return(false); } return((data.HighPriorityGestureTypes & _activeGestureTypes) != 0); }
private void CancelLowPriorityGestureProcess(CocoGestureType gestureType) { CocoTouchPriorityConfigData data = _gestureConfigDataDic.GetValue(gestureType); if (data == null) { return; } if (data.LowPriorityGestureTypes != null) { data.LowPriorityGestureTypes.ForEach(CancelGestureDataProcess); } }
private void CancelGestureDataProcess(CocoGestureType gestureType) { if (IsGestureProcessing(gestureType)) { //Debug.LogErrorFormat ("{0}: {1}->CancelGestureDataProcess: {2} cancelled", Time.time, GetType ().Name, gestureType); EndGestureProcess(gestureType); CocoTouchPriorityConfigData data = _gestureConfigDataDic.GetValue(gestureType); if (data != null) { data.CancelGestureProcess(); } } CancelLowPriorityGestureProcess(gestureType); }
private bool ProcessGestureData(CocoGestureType gestureType, object gesture) { if (!IsGestureProcessing(gestureType)) { return(false); } CocoTouchPriorityConfigData data = _gestureConfigDataDic.GetValue(gestureType); if (data == null) { return(false); } data.ProcessGesture(gesture); return(true); }
public void SetGesturePriorities(CocoGestureType gestureType, CocoGestureType[] lowPriorityGestureTypes) { CocoTouchPriorityConfigData data = _gestureConfigDataDic.GetValue(gestureType); if (data == null) { return; } data.LowPriorityGestureTypes = lowPriorityGestureTypes; lowPriorityGestureTypes.ForEach(lowPriorityGestureType => { CocoTouchPriorityConfigData lowPriorityPriorityData = _gestureConfigDataDic.GetValue(lowPriorityGestureType); if (lowPriorityPriorityData == null) { return; } lowPriorityPriorityData.HighPriorityGestureTypes |= gestureType; }); }