예제 #1
0
        public static FloodPathTracer Construct(Vector3 start, FloodPath flood, OnPathDelegate callback = null)
        {
            var p = PathPool.GetPath <FloodPathTracer>();

            p.Setup(start, flood, callback);
            return(p);
        }
예제 #2
0
        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;
        }
예제 #3
0
        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);
        }
예제 #4
0
 protected override void Reset()
 {
     base.Reset();
     flood = null;
 }