public static bool IsLeftOf(ref Rectangle player, Rectangle box, ref Vector2 velocity, ref Vector2 playerPosition, bool positionBoxes = true) { bool rtn = player.IsLeftOf(box, velocity); if (positionBoxes && rtn) { velocity.X = 0; playerPosition.X = box.Left - player.Width; player.X = (int)playerPosition.X; } return rtn; }