public NodeLayoutInfo(Node node, NodeDrawInfo nodeDrawInfo, int mass = 1) { Node = node; NodeDrawInfo = nodeDrawInfo; Velocity = Vector2.zero; Mass = mass; }
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(); }