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