Esempio n. 1
0
        public void OnEndDrag(PointerEventData eventData)
        {
            SfxManager.Instance.Play(SfxType.UI_DragEnd);

            OnDragEnd?.Invoke();

            selectedObject = null;
            Destroy(this.gameObject);
        }
Esempio n. 2
0
        public void OnBeginDrag(PointerEventData eventData)
        {
            if (IsDraggable == false)
            {
                return;
            }

            SfxManager.Instance.Play(SfxType.UI_DragStart);

            OnDragBegin?.Invoke();

            selectedObject = this;
            startPos       = transform.position;
            IsDragging     = true;
        }