Esempio n. 1
0
    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);
    }
Esempio n. 2
0
 public abstract bool Check(CandiDrag draggable);
Esempio n. 3
0
 public bool Accepts(CandiDrag draggable)
 {
     return(DropConditions.TrueForAll(cond => cond.Check(draggable)));
 }
Esempio n. 4
0
 public void Drop(CandiDrag draggable)
 {
     OnDropHandler?.Invoke(draggable);
 }
Esempio n. 5
0
 public override bool Check(CandiDrag draggable)
 {
     return(draggable.GetComponent <CandiSquare>() != null);
 }