public void SetPos(T vertex, Vector2 pos) { VertexData <T, P> data; if (!VerticesData.TryGetValue(vertex, out data)) { Log.Error("Graph.SetPos: unknown vertex " + vertex); return; } data.pos = pos; }
public Vector2 GetPos(T vertex) { VertexData <T, P> data; if (!VerticesData.TryGetValue(vertex, out data)) { Log.Error("Graph.GetPos: unknown vertex " + vertex); return(Vector2.zero); } return(data.pos); }