Beispiel #1
0
    public void ReCalculateVerticesPosition()
    {
        Vector2[]  positions   = meshEntity.GetComponent <EditablePanelMesh>().GetVerticesScreenPosition();
        UIVertex[] allVertices = this.transform.GetComponentsInChildren <UIVertex>();

        for (int vertexIndex = 0; vertexIndex < allVertices.Length; ++vertexIndex)
        {
            UIVertex vertex = allVertices[vertexIndex];
            vertex.GetComponent <RectTransform>().position = positions[vertex.VertexIndex];
        }
    }
Beispiel #2
0
 public void AddDirtyVertex(int vertexIndex, UIVertex vertex)
 {
     dirtyVertices.Add(vertexIndex, vertex);
     vertex.GetComponent <Image>().sprite = Resources.Load <Sprite>("Textures/selected");
 }