Ejemplo n.º 1
0
    public void AddPointOnCurve(int beforeWhichIndex, Vector2 toAdd)
    {
        e2dCurveNode e2dCurveNode = new e2dCurveNode(toAdd);

        if (beforeWhichIndex > 0)
        {
            e2dCurveNode.texture = this.TerrainCurve[beforeWhichIndex - 1].texture;
        }
        else if (beforeWhichIndex < this.TerrainCurve.Count)
        {
            e2dCurveNode.texture = this.TerrainCurve[beforeWhichIndex].texture;
        }
        this.TerrainCurve.Insert(beforeWhichIndex, e2dCurveNode);
        this.mCurveMesh.UpdateControlTextures();
    }
Ejemplo n.º 2
0
 /// Copies data from another node.
 public void Copy(e2dCurveNode other)
 {
     position = other.position;
     texture = other.texture;
     grassRatio = other.grassRatio;
 }
Ejemplo n.º 3
0
 /// Adds new point to the curve. The new node will have the default texture.
 public void AddPointOnCurve(int beforeWhichIndex, Vector2 toAdd)
 {
     e2dCurveNode node = new e2dCurveNode(toAdd);
     if (beforeWhichIndex > 0) node.texture = TerrainCurve[beforeWhichIndex - 1].texture;
     else if (beforeWhichIndex < TerrainCurve.Count) node.texture = TerrainCurve[beforeWhichIndex].texture;
     TerrainCurve.Insert(beforeWhichIndex, node);
     mCurveMesh.UpdateControlTextures();
 }
Ejemplo n.º 4
0
 public void Copy(e2dCurveNode other)
 {
     this.position   = other.position;
     this.texture    = other.texture;
     this.grassRatio = other.grassRatio;
 }