private void CheckTap() { if (_listTap == null) { return; } Vector2 touchPos, diffPos; GetPosition(out touchPos, out diffPos); for (int i = 0, len = _listTap.Count; i < len; ++i) { GestureTap tap = _listTap[i]; if (tap.enabled) { if (tap.Check(diffPos, _time)) { tap.position = touchPos; tap.callback(); } } } }
public bool RemoveTap(GestureTap tap) { if (tap == null || _listTap == null) { return(false); } return(_listTap.Remove(tap)); }
public bool AddTap(GestureTap tap) { if (tap == null) { return(false); } if (_listTap == null) { _listTap = new List <GestureTap>(); } _listTap.Add(tap); return(true); }