Esempio n. 1
0
        /*End Image*/

        /*Start Drag*/

        protected void dragInit(UI render, GameObject self, UIElementMeta meta, object context)
        {
            if (meta.Node.Attributes ["dragable"] != null)
            {
                Dragable drag = meta.Dragable;
                drag.Meta = meta;
            }
        }
Esempio n. 2
0
        public void OnDrop(PointerEventData eventData)
        {
            Dragable drag = eventData.pointerDrag.GetComponent <Dragable> ();

            if (drag != null)
            {
                if (drag.Group == this.Group && this._value == null)
                {
                    this.Value = drag;
                    drag.transform.SetParent(this.transform);
                    drag.transform.position = this.transform.position;
                    drag.Slot = this;
                }
            }
        }