示例#1
0
        /// <summary>
        /// Gets all objects close to the collidable objects passed in parameter
        /// </summary>
        /// <param name="collidables"></param>
        /// <param name="functionTest"></param>
        /// <returns></returns>
        public bool TestCandidates(ICollidable2[] collidables, TestManyCallback testFunction)
        {
            bool hasCandidate = false;

            List <ICollidable2> candidates;

            foreach (ICollidable2 collidable in collidables)
            {
                candidates = GetCandidates(collidable);
                foreach (ICollidable2 candidate in candidates)
                {
                    testFunction(collidable, candidate);
                    hasCandidate = true;
                }
            }

            return(hasCandidate);
        }
示例#2
0
        /// <summary>
        /// Gets all objects close to the collidable objects passed in parameter
        /// </summary>
        /// <param name="collidables"></param>
        /// <param name="functionTest"></param>
        /// <returns></returns>
        public bool TestCandidates(ICollidable2[] collidables, TestManyCallback testFunction)
        {
            bool hasCandidate = false;

            List<ICollidable2> candidates;
            foreach (ICollidable2 collidable in collidables)
            {
                candidates = GetCandidates(collidable);
                foreach (ICollidable2 candidate in candidates)
                {
                    testFunction(collidable, candidate);
                    hasCandidate = true;
                }
            }

            return hasCandidate;
        }
示例#3
0
 public bool TestCandidates(ICollidable2 collidable, TestManyCallback functionTest)
 {
     return TestCandidates(new ICollidable2[] { collidable }, functionTest);
 }
示例#4
0
 public bool TestCandidates(ICollidable2 collidable, TestManyCallback functionTest)
 {
     return(TestCandidates(new ICollidable2[] { collidable }, functionTest));
 }