public void Draw() { evaluator = new PathEvaluator(Path, looping); pathReady.Invoke(Evaluator); pointsCountReady.Invoke(evaluator.Points.Length); pointsReady.Invoke(evaluator.Points); }
public PathEvaluator(PathEvaluator duplicatedCurve, Transform relativeTransform, bool loopingPath = false) { this.loopingPath = loopingPath; Vector3[] dupPoints = duplicatedCurve.Points; points = new List <Vector3>(dupPoints.Length); for (int i = 0; i < dupPoints.Length; i++) { points.Add(relativeTransform.TransformPoint(dupPoints[i])); } HandleDistances(); }