private void OnItemDropped(CandiDrag draggable) { Transform child = transform.parent.GetChild(0); if ((candiDirectionAsk && candiDirectionAskState != draggable.horizontalState) || child.childCount > 0) { return; } totalCandi++; candiItem = draggable; draggable.transform.position = transform.position; GameObject[] parents = GameObject.FindGameObjectsWithTag("Blueprint1"); foreach (GameObject oneParent in parents) { FindAllChildsName(oneParent.transform); } Destroy(gameObject); }
public abstract bool Check(CandiDrag draggable);
public bool Accepts(CandiDrag draggable) { return(DropConditions.TrueForAll(cond => cond.Check(draggable))); }
public void Drop(CandiDrag draggable) { OnDropHandler?.Invoke(draggable); }
public override bool Check(CandiDrag draggable) { return(draggable.GetComponent <CandiSquare>() != null); }