public void Makeinstance()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
Example #2
0
    public void OnDrop(PointerEventData eventdata)
    {
        Debug.Log(eventdata.pointerDrag.name + "was dropped on" + gameObject.name);

        DragandDrop d = eventdata.pointerDrag.GetComponent <DragandDrop>();

        if (d != null)
        {
            if (typeofItem == d.typeofitem || typeofItem == DragandDrop.Slot.INVENTORY)
            {
                d.parentToReturnTo = this.transform;
            }
        }
    }
Example #3
0
 private void Awake()
 {
     ScriptDragandDrop = GetComponent <DragandDrop>();
     rectTransform     = GetComponent <RectTransform>();
 }
Example #4
0
 public Rules()
 {
     dad   = new DragandDrop();
     chess = new Chess();
 }