public void Makeinstance()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
예제 #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;
            }
        }
    }
예제 #3
0
 private void Awake()
 {
     ScriptDragandDrop = GetComponent <DragandDrop>();
     rectTransform     = GetComponent <RectTransform>();
 }
예제 #4
0
 public Rules()
 {
     dad   = new DragandDrop();
     chess = new Chess();
 }