public static FloodPathTracer Construct(Vector3 start, FloodPath flood, OnPathDelegate callback = null) { var p = PathPool.GetPath <FloodPathTracer>(); p.Setup(start, flood, callback); return(p); }
public FloodPathConstraint(FloodPath path) { if (path == null) { #if !SERVER UnityEngine.Debug.LogWarning("FloodPathConstraint should not be used with a NULL path"); #endif } this.path = path; }
protected void Setup(Vector3 start, FloodPath flood, OnPathDelegate callback) { this.flood = flood; if (flood == null || flood.PipelineState < PathState.Returned) { throw new System.ArgumentException("You must supply a calculated FloodPath to the 'flood' argument"); } base.Setup(start, flood.originalStartPoint, callback); nnConstraint = new FloodPathConstraint(flood); }
protected override void Reset() { base.Reset(); flood = null; }