/// <summary> /// Checks if a given rectanlge intersects with one of the smoke puffs fired by the beekeeper. /// </summary> /// <param name="checkRectangle">The rectangle to check for collisions with smoke puffs.</param> /// <returns>One of the smoke puffs with which the supplied regtangle collides, or null if it collides with /// none.</returns> public SmokePuff CheckSmokeCollision(Rectangle checkRectangle) { foreach (SmokePuff smokePuff in FiredSmokePuffs) { if (checkRectangle.HasCollision(smokePuff.CentralCollisionArea)) { return smokePuff; } } return null; }