Exemple #1
0
        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;
        }
Exemple #2
0
        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);
        }