private void CheckPinch(float wheelAxis) { if (_listPinch == null) { return; } for (int i = 0, len = _listPinch.Count; i < len; ++i) { GesturePinch pinch = _listPinch[i]; pinch._wheel += wheelAxis; if (pinch.pinchIn) { if (pinch.threshold < pinch._wheel) { pinch._wheel = 0.0f; pinch.callback(); } } else { if (pinch.threshold < -pinch._wheel) { pinch._wheel = 0.0f; pinch.callback(); } } } }
public bool RemovePinch(GesturePinch pinch) { if (pinch == null || _listPinch == null) { return(false); } return(_listPinch.Remove(pinch)); }
public bool AddPinch(GesturePinch pinch) { if (pinch == null) { return(false); } if (_listPinch == null) { _listPinch = new List <GesturePinch>(); } _listPinch.Add(pinch); return(true); }