예제 #1
0
        protected override bool _isFlingGesture(VelocityEstimate estimate)
        {
            float minVelocity = minFlingVelocity ?? Constants.kMinFlingVelocity;
            float minDistance = minFlingDistance ?? Constants.kTouchSlop;

            return(Mathf.Abs(estimate.pixelsPerSecond.dx) > minVelocity && Mathf.Abs(estimate.offset.dx) > minDistance);
        }
예제 #2
0
        protected override bool _isFlingGesture(VelocityEstimate estimate)
        {
            double minVelocity = this.minFlingVelocity ?? Constants.kMinFlingVelocity;
            double minDistance = this.minFlingDistance ?? Constants.kTouchSlop;

            return(Math.Abs(estimate.pixelsPerSecond.dy) > minVelocity && Math.Abs(estimate.offset.dy) > minDistance);
        }
예제 #3
0
파일: monodrag.cs 프로젝트: JC-ut0/CubeGame
        protected override bool _isFlingGesture(VelocityEstimate estimate)
        {
            float minVelocity = this.minFlingVelocity ?? Constants.kMinFlingVelocity;
            float minDistance = this.minFlingDistance ?? Constants.kTouchSlop;

            return(estimate.pixelsPerSecond.distanceSquared > minVelocity * minVelocity &&
                   estimate.offset.distanceSquared > minDistance * minDistance);
        }
예제 #4
0
        public Velocity getVelocity()
        {
            VelocityEstimate estimate = getVelocityEstimate();

            if (estimate == null || estimate.pixelsPerSecond == Offset.zero)
            {
                return(Velocity.zero);
            }

            return(new Velocity(pixelsPerSecond: estimate.pixelsPerSecond));
        }
예제 #5
0
 protected abstract bool _isFlingGesture(VelocityEstimate estimate);