Beispiel #1
0
        public static IEnumerable <Actor> FindUnits(this World world, PPos a, PPos b)
        {
            var u = PPos.Min(a, b);
            var v = PPos.Max(a, b);

            return(world.WorldActor.Trait <SpatialBins>().ActorsInBox(u, v));
        }
Beispiel #2
0
        public static IEnumerable <Actor> FindActorsInBox(this World world, WPos tl, WPos br)
        {
            var a = PPos.FromWPos(tl);
            var b = PPos.FromWPos(br);
            var u = PPos.Min(a, b);
            var v = PPos.Max(a, b);

            return(world.WorldActor.Trait <SpatialBins>().ActorsInBox(u, v));
        }