Esempio n. 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);
        }
Esempio n. 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;
        }
Esempio n. 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);
        }
Esempio n. 4
0
 protected override void Reset()
 {
     base.Reset();
     flood = null;
 }