/// <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); }
/// <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; }
public bool TestCandidates(ICollidable2 collidable, TestManyCallback functionTest) { return TestCandidates(new ICollidable2[] { collidable }, functionTest); }
public bool TestCandidates(ICollidable2 collidable, TestManyCallback functionTest) { return(TestCandidates(new ICollidable2[] { collidable }, functionTest)); }