Exemple #1
0
    public void SetAsGroupToLink()
    {
        ChildrenManager cM = GameObject.Find("ChildrenManager").GetComponent <ChildrenManager>();

        cM.EnableAllLinkButtons();
        cM.SetGroup(gameObject);
        cM.DisableGroupLinkButtons();
    }
Exemple #2
0
    //Called when the user clicks the link button. Sets the node as the current node to
    //link to the next node the user hits the link button on
    public void SetAsNodeToLink()
    {
        ChildrenManager cM = GameObject.Find("ChildrenManager").GetComponent <ChildrenManager>();

        if (cM.nodeToLink != null)
        {
            if (cM.nodeToLink == gameObject)
            {
                cM.nodeToLink = null;
                cM.EnableAllLinkButtons();
                cM.DisableGroupLinkButtons();
                return;
            }
        }
        cM.nodeToLink = gameObject;
        //set all other link buttons to not be interactable
        cM.DisableAllLinkButtons();
        //set this button to be interactable to cancel the action
        transform.GetChild(7).GetComponent <Button>().interactable = true;
        cM.EnableGroupLinkButtons();
    }