public Sight(IObserver observer, SightConfiguration config, ISightCache cache, ISightRaycaster raycaster, ISightPathExtrapolator extrapolator) { Assert.IsNotNull(observer); Assert.IsNotNull(config); // Assert.IsNotNull(cache); // Cache can be null IF all targets use manual indexing. Assert.IsNotNull(raycaster); if (config.extrapolatePath) { Assert.IsNotNull(extrapolator, "Use extrapolate path is enabled, but no ISightPathExtrapolator implementation given."); } this.observer = observer; this.config = config; this.cache = cache; this.raycaster = raycaster; this.extrapolator = extrapolator; targetsInRange = new List <SightTargetInfo>(16); }
public Sight2D(IObserver observer, SightConfiguration config, ISightCache cache, ISightRaycaster raycaster, ISightPathExtrapolator extrapolator) : base(observer, config, cache, raycaster, extrapolator) { }
public Sight2D(IObserver observer, SightConfiguration config, ISightCache cache) : base(observer, config, cache, new Raycaster3D(), new SightPathExtrapolator(config)) { }