public static SplineBase GenerateBranch(SplineBase splineA, SplineBase splineB, float from, float to, SplineBase.PositionUnits positionUnits) { BranchBetweenSplines branch = GameObject.Instantiate(Resources.Load <BranchBetweenSplines>("BRANCH_SPLINE")); branch.Construct(splineA, splineB, from, to, positionUnits); return(branch.SplineBase); }
public void Construct(SplineBase splineA, SplineBase splineB, float from, float to, SplineBase.PositionUnits positionUnits) { _splineA = splineA; _splineB = splineB; _pathPositionA = from; _pathPositionB = to; _positionUnits = positionUnits; ConstructSpline(); }
public override bool AreSplinesSimilare(SplineBase splineA, SplineBase splineB) { Spline A = splineA as Spline; Spline B = splineB as Spline; if (A == null || B == null) { return(false); } for (int i = 0; i < A.Waypoints.Length; i++) { if (!Waypoint.AreEqual(A.Waypoints[i], B.Waypoints[i])) { Debug.Log("not equal waypoints " + i); return(false); } } return(true); }
public override bool AreSplinesSimilare(SplineBase splineA, SplineBase splineB) { SplineSmooth A = splineA as SplineSmooth; SplineSmooth B = splineB as SplineSmooth; if (A == null || B == null) { return(false); } for (int i = 0; i < A.Waypoints.Length; i++) { if (!Waypoint.AreEqual(A.Waypoints[i], B.Waypoints[i])) { return(false); } } return(true); }
public void RemoveSpline(SplineBase spline) { _splineLister.Remove(spline); }
public void AddSpline(SplineBase spline) { _splineLister.AddIfNotContain(spline); }
public abstract bool AreSplinesSimilare(SplineBase splineA, SplineBase splineB);