Ejemplo n.º 1
0
    public ActionButtonNode GetRoot()
    {
        ActionButtonNode n = new ActionButtonNode();

        n.SetChildren(actionRoots);
        n.label             = label;
        n.spriteLabel       = spriteLabel;
        n.cornerSpriteLabel = cornerSpriteLabel;
        bool dis = true;

        foreach (ActionButtonNode child in n.children)
        {
            if (!child.disabled)
            {
                dis = false;
            }
        }
        if (dis)
        {
            n.disabled       = true;
            n.disabledReason = "There are no options.";
        }

        return(n);
    }
Ejemplo n.º 2
0
 public void InitiateActionTree(List <ActionButtonNode> nodes)
 {
     root.SetChildren(nodes);
     SetCurrentActionNodes(nodes);
     UpdatePeripheralActions();
 }