예제 #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 Link(string fromNode, int fromAnchorIndex, string toNode, int toAnchorIndex)
 {
     commands.Add(PWGraphCLI.GenerateLinkAnchorCommand(fromNode, fromAnchorIndex, toNode, toAnchorIndex));
     return(this);
 }
예제 #3
0
 public PWGraphBuilder Link(string fromNode, string fromAnchor, string toNode, string toAnchor)
 {
     commands.Add(PWGraphCLI.GenerateLinkAnchorNameCommand(fromNode, fromAnchor, toNode, toAnchor));
     return(this);
 }
예제 #4
0
 public PWGraphBuilder Link(string from, string to)
 {
     commands.Add(PWGraphCLI.GenerateLinkCommand(from, to));
     return(this);
 }
예제 #5
0
 public PWGraphBuilder NewNode <T>(string name, PWGraphCLIAttributes attributes = null) where T : PWNode
 {
     commands.Add(PWGraphCLI.GenerateNewNodeCommand(typeof(T), name, attributes));
     return(this);
 }
예제 #6
0
 public void Execute(string command)
 {
     PWGraphCLI.Execute(this, command);
 }
예제 #7
0
 //wipeDatas will remove all the graph content before importing the file
 public void Import(string filePath, bool wipeDatas = false)
 {
     PWGraphCLI.Import(this, filePath, wipeDatas);
 }
예제 #8
0
 //export the graph as commands in a file and return the created file path
 public void Export(string filePath)
 {
     PWGraphCLI.Export(this, filePath);
 }