예제 #1
0
        void OnPathComplete(Path p)
        {
            waitingForPathCalc = false;
            p.Claim(this);

            if (p.error)
            {
                p.Release(this);
                return;
            }

            if (traversingSpecialPath)
            {
                delayUpdatePath = true;
            }
            else
            {
                if (rp == null)
                {
                    rp = new RichPath();
                }
                rp.Initialize(seeker, p, true, funnelSimplification);
            }
            p.Release(this);
        }
예제 #2
0
 private void OnPathComplete(Path p)
 {
     this.waitingForPathCalc = false;
     p.Claim(this);
     if (p.error)
     {
         p.Release(this, false);
     }
     else
     {
         if (this.traversingSpecialPath)
         {
             this.delayUpdatePath = true;
         }
         else
         {
             if (this.rp == null)
             {
                 this.rp = new RichPath();
             }
             this.rp.Initialize(this.seeker, p, true, this.funnelSimplification);
         }
         p.Release(this, false);
     }
 }
예제 #3
0
 public RichFunnel Initialize(RichPath path, NavGraph graph)
 {
     if (graph == null)
     {
         throw new ArgumentNullException("graph");
     }
     if (this.graph != null)
     {
         throw new InvalidOperationException("Trying to initialize an already initialized object. " + graph);
     }
     this.graph = graph;
     this.path  = path;
     return(this);
 }
예제 #4
0
		/** Works like a constructor, but can be used even for pooled objects. Returns \a this for easy chaining */
		public RichFunnel Initialize (RichPath path, IFunnelGraph graph) {
			if (graph == null) throw new System.ArgumentNullException ("graph");
			if (this.graph != null) throw new System.InvalidOperationException ("Trying to initialize an already initialized object. " + graph);

			this.graph = graph;
			this.path = path;
			return this;
		}
예제 #5
0
		void OnPathComplete (Path p) {
			waitingForPathCalc = false;
			p.Claim(this);
			
			if (p.error) {
				p.Release(this);
				return;
			}
			
			if (traversingSpecialPath) {
				delayUpdatePath = true;
			} else {
				if (rp == null) rp = new RichPath();
				rp.Initialize (seeker, p,true, funnelSimplification);
			}
			p.Release(this);
		}