public override bool AddChild(Connector connector, Node node, int index) { if (node is DecoratorWeight) { return base.AddChild(connector, node, index); } else { DecoratorWeight weightNode = new DecoratorWeight(); if (base.AddChild(connector, weightNode, index)) { bool add = weightNode.AddChild(weightNode.GetConnector(connector.Identifier), node); weightNode.ResetId(true); return add; } } return false; }
public override bool AddChild(Connector connector, Node node, int index) { if (node is DecoratorWeight) { return(base.AddChild(connector, node, index)); } else { DecoratorWeight weightNode = new DecoratorWeight(); if (base.AddChild(connector, weightNode, index)) { bool add = weightNode.AddChild(weightNode.GetConnector(connector.Identifier), node); weightNode.ResetId(true); return(add); } } return(false); }