private void CheckFlick()
        {
            if (_listFlick == null)
            {
                return;
            }

            Vector2 touchPos, diffPos;

            GetPosition(out touchPos, out diffPos);

            for (int i = 0, len = _listFlick.Count; i < len; ++i)
            {
                GestureFlick flick = _listFlick[i];

                if (flick.enabled)
                {
                    if (flick.Check(diffPos, _time))
                    {
                        flick.position = touchPos;

                        flick.callback();
                    }
                }
            }
        }
示例#2
0
        public bool RemoveFlick(GestureFlick flick)
        {
            if (flick == null || _listFlick == null)
            {
                return(false);
            }

            return(_listFlick.Remove(flick));
        }
示例#3
0
        public bool AddFlick(GestureFlick flick)
        {
            if (flick == null)
            {
                return(false);
            }

            if (_listFlick == null)
            {
                _listFlick = new List <GestureFlick>();
            }

            _listFlick.Add(flick);

            return(true);
        }