public FloodPathTracer(Vector3 start, FloodPath flood, OnPathDelegate callbackDelegate) : base(start,flood.originalStartPoint,callbackDelegate) { this.flood = flood; if (flood == null || !flood.processed) throw new System.ArgumentNullException ("You must supply a calculated FloodPath to the 'flood' argument"); hasEndPoint = false; nnConstraint = new PathIDConstraint (); }
public FloodPathTracer(Vector3 start, FloodPath flood, OnPathDelegate callbackDelegate) : base(start, flood.originalStartPoint, callbackDelegate) { this.flood = flood; if (flood == null || !flood.processed) { throw new System.ArgumentNullException("You must supply a calculated FloodPath to the 'flood' argument"); } hasEndPoint = false; nnConstraint = new PathIDConstraint(); }
public override void Prepare() { PathIDConstraint pic = nnConstraint as PathIDConstraint; if (pic == null) { Debug.LogWarning("It is not recommended to call a FloodPathTracer path with a NNConstraint not inheriting from PathIDConstraint"); } else { pic.SetPath(flood); } base.Prepare(); }