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); }
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); } }
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); }
/** 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; }
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); }