예제 #1
0
 public NodeLayoutInfo(Node node, NodeDrawInfo nodeDrawInfo, int mass = 1)
 {
     Node         = node;
     NodeDrawInfo = nodeDrawInfo;
     Velocity     = Vector2.zero;
     Mass         = mass;
 }
예제 #2
0
 public void UpdateDrawInfos(Graph graph)
 {
     _nodeDrawInfos = new Dictionary <Node, NodeDrawInfo>();
     foreach (var node in graph.Nodes)
     {
         _nodeDrawInfos[node] = new NodeDrawInfo(node.Id, Vector2.zero);
     }
     Layout();
 }