コード例 #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);
 }