public void Initialize(Contour terrain, ContourSegmentConfig config, ContourSegmentAttributes attributes) { this.terrain = terrain; this.config = config; this.attributes = attributes; transform.parent = terrain.transform; transform.localPosition = Vector2.zero; CalculateSlopeVector(); CalculatePerpendicularSlopeVector(); GenerateEndPoint(); GenerateMidPoints(); // BumpifyMidPointsIfNeeded(); CollectAllPointsInList(); CalculateSurfaceMeasures(); CalculateDistAtEnd(); }
public ContourSegmentGenerator(ContourSegmentAttributes attributes) { this.attributes = attributes; }