Exemplo n.º 1
0
        /// <inheritdoc />
        protected override void touchesMoved(IList <TouchPoint> touches)
        {
            base.touchesMoved(touches);

            for (var i = 0; i < touches.Count; i++)
            {
                var touch = touches[i];
                var data  = getPointerData(touch);
                if (TouchUtils.IsTouchOnTarget(touch, cachedTransform))
                {
                    if (!data.OnTarget)
                    {
                        data.OnTarget = true;
                        ExecuteEvents.Execute(gameObject, data.Data, ExecuteEvents.pointerEnterHandler);
                    }
                }
                else
                {
                    if (data.OnTarget)
                    {
                        data.OnTarget = false;
                        ExecuteEvents.Execute(gameObject, data.Data, ExecuteEvents.pointerExitHandler);
                    }
                }
                setPointerData(touch, data);
            }

            Debug.Log("touches moved");
        }
Exemplo n.º 2
0
        /// <inheritdoc />
        protected override void touchMoved(TouchPoint touch)
        {
            base.touchMoved(touch);

            var data = getPointerData(touch);

            if (TouchUtils.IsTouchOnTarget(touch, cachedTransform))
            {
                if (!data.OnTarget)
                {
                    data.OnTarget = true;
                    ExecuteEvents.Execute(gameObject, data.Data, ExecuteEvents.pointerEnterHandler);
                }
            }
            else
            {
                if (data.OnTarget)
                {
                    data.OnTarget = false;
                    ExecuteEvents.Execute(gameObject, data.Data, ExecuteEvents.pointerExitHandler);
                }
            }
            setPointerData(touch, data);
        }