Пример #1
0
        public void OnEndDrag(PointerEventData eventData)
        {
            if (!this.pressed)
            {
                return;
            }

            this.pressed = false;

            ListenerUtility.Calls(this.onEndDragListeners);
        }
Пример #2
0
        public void OnBeginDrag(PointerEventData eventData)
        {
            this.pressed = true;

            var time = Time.realtimeSinceStartup;
            var pos  = this.ToPosition(eventData.position);

            this.timeSlice.Clear();
            if (this.IsAvailableFastSwipe)
            {
                this.timeSlice.AddLast(new TimeSlice {
                    time = time, position = pos,
                });
            }

            this.startPos = pos;

            ListenerUtility.Calls(this.onStartDragListeners);
        }
Пример #3
0
        public void OnDrag(PointerEventData eventData)
        {
            if (!this.pressed)
            {
                return;
            }

            var time = Time.realtimeSinceStartup;
            var pos  = this.ToPosition(eventData.position);

            if (this.IsAvailableFastSwipe)
            {
                this.timeSlice.AddLast(new TimeSlice {
                    time = time, position = pos,
                });
                this.UpdateTimeSlice(time);
            }

            ListenerUtility.Calls(this.onDraggingListeners);
        }
Пример #4
0
 protected override void OnResize()
 {
     ListenerUtility.Calls(this.onResizeListeners);
 }
Пример #5
0
        public void OnBeginDrag(PointerEventData eventData)
        {
            this.pressed = true;

            ListenerUtility.Calls(this.onStartDragListeners);
        }