Beispiel #1
0
        private static void Scan(Vector2d center, long radius, Func <LSAgent, bool> conditional)
        {
            int gridX;
            int gridY;

            GridManager.GetScanCoordinates(center.x, center.y, out gridX, out gridY);
            InfluenceManager.ScanAll(gridX, gridY, InfluenceManager.GenerateDeltaCount(radius), LSProjectile.outputAgents, conditional);
        }
Beispiel #2
0
        public static LSAgent Scan(Vector2d position, int deltaCount, Func <LSAgent, bool> agentConditional, Func <byte, bool> bucketConditional)
        {
            int gridX;
            int gridY;

            GridManager.GetScanCoordinates(position.x, position.y, out gridX, out gridY);
            return(FindClosestAgent(position, ScanAll(gridX, gridY, deltaCount, agentConditional, bucketConditional)));
        }
Beispiel #3
0
        private static IEnumerable <LSAgent> Scan(Vector2d center, long radius, LSAgent sourceAgent, AllegianceType targetAllegiance)
        {
            int gridX;
            int gridY;

            GridManager.GetScanCoordinates(center.x, center.y, out gridX, out gridY);
            foreach (LSAgent agent in InfluenceManager.ScanAll(gridX, gridY, InfluenceManager.GenerateDeltaCount(radius), sourceAgent, targetAllegiance))
            {
                yield return(agent);
            }
        }
        private IEnumerable <LSAgent> Scan(Vector2d center, long radius)
        {
            int gridX;
            int gridY;

            GridManager.GetScanCoordinates(center.x, center.y, out gridX, out gridY);
            foreach (LSAgent agent in InfluenceManager.ScanAll(
                         gridX,
                         gridY,
                         InfluenceManager.GenerateDeltaCount(radius),
                         this.AgentConditional,
                         this.BucketConditional)
                     )
            {
                yield return(agent);
            }
        }