/// <summary> /// Test if a group of entities is collinding another group of entities. /// </summary> /// <param name="groupA"></param> /// <param name="groupB"></param> /// <returns></returns> public static bool CollideGroupWithGroup(YnGroup groupA, YnGroup groupB) { bool collide = false; int i = 0; int j = 0; int groupASize = groupA.Count; int groupBSize = groupB.Count; while (i < groupASize && !collide) { while (j < groupBSize && !collide) { collide = Collide(groupA[i], groupB[j]); j++; } i++; } return(collide); }
/// <summary> /// Test if a group of entities is collinding another group of entities. /// </summary> /// <param name="groupA"></param> /// <param name="groupB"></param> /// <returns></returns> public static bool CollideGroupWithGroup(YnGroup groupA, YnGroup groupB) { bool collide = false; int i = 0; int j = 0; int groupASize = groupA.Count; int groupBSize = groupB.Count; while (i < groupASize && !collide) { while (j < groupBSize && !collide) { collide = Collide(groupA[i], groupB[j]); j++; } i++; } return collide; }