示例#1
0
 public PWGraphBuilder NewNode(Type nodeType, Vector2 position, string name, PWGraphCLIAttributes attributes = null)
 {
     if (!nodeType.IsSubclassOf(typeof(PWNode)))
     {
         Debug.Log("[PWGraphBuilder] unknown node type: '" + nodeType + "'");
         return(this);
     }
     commands.Add(PWGraphCLI.GenerateNewNodeCommand(nodeType, name, position, attributes));
     return(this);
 }
示例#2
0
 public PWGraphBuilder NewNode <T>(string name, PWGraphCLIAttributes attributes = null) where T : PWNode
 {
     commands.Add(PWGraphCLI.GenerateNewNodeCommand(typeof(T), name, attributes));
     return(this);
 }