Exemplo n.º 1
0
    public void OnBeginDrag(PointerEventData eventData)
    {
        if (!CanDrag())
        {
            return;
        }

        itemBeingDragged = this;
        parentSlot.Select();
        GetComponent <CanvasGroup>().blocksRaycasts = false;
    }
Exemplo n.º 2
0
 private void Start()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Debug.LogError("Duplicate " + this.GetType().Name);
         Destroy(gameObject);
     }
 }
Exemplo n.º 3
0
 private void EndDrag()
 {
     itemBeingDragged        = null;
     transform.localPosition = Vector3.zero;
     GetComponent <CanvasGroup>().blocksRaycasts = true;
 }