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(); }
/// Copies data from another node. public void Copy(e2dCurveNode other) { position = other.position; texture = other.texture; grassRatio = other.grassRatio; }
/// 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(); }
public void Copy(e2dCurveNode other) { this.position = other.position; this.texture = other.texture; this.grassRatio = other.grassRatio; }