Ejemplo n.º 1
0
        public override bool AddChild(Connector connector, Node node, int index)
        {
            if (node is WithPrecondition)
            {
                return base.AddChild(connector, node, index);
            }
            else
            {
                WithPrecondition withPrecondition = new WithPrecondition();
                if (base.AddChild(connector, withPrecondition, index))
                {
                    withPrecondition.ResetId(false);
                    return withPrecondition.AddChild(withPrecondition.GetConnector("Action"), node);
                }
            }

            return false;
        }
Ejemplo n.º 2
0
        public override bool AddChild(Connector connector, Node node, int index)
        {
            if (node is WithPrecondition)
            {
                return(base.AddChild(connector, node, index));
            }
            else
            {
                WithPrecondition withPrecondition = new WithPrecondition();
                if (base.AddChild(connector, withPrecondition, index))
                {
                    withPrecondition.ResetId(false);
                    return(withPrecondition.AddChild(withPrecondition.GetConnector("Action"), node));
                }
            }

            return(false);
        }