2D Collision Detection
Collision detection

You can calculate the collision much easier with the Rectangle structure.

Use the Contains method if you are interested in single points that


  Determines if the specified point is contained within this Rectangle structure.


var pictureRect = new Rectangle(
    pictureBox.Location.X, 
    pictureBox.Location.Y, 
    pictureBox.Width, 
    pictureBox.Height
);
var isCollision = pictureRect.Contains(player.Location.X, player.Location.Y);




If you want to know whether the rectangles have a collision then use the  IntersectsWith method that


  Determines if this rectangle intersects with rect.


var isCollision = pictureRect.IntersectsWith(player.Rectangle());




Create and an extension to easier get the rectangle from a PictureBox.

public static Rectangle Rectangle(this PictureBox pictureBox)
{
    return new Rectangle(
        pictureBox.Location.X, 
        pictureBox.Location.Y, 
        pictureBox.Width, 
        pictureBox.Height
    );
}




Naming


foreach(PictureBox s in rocks)



You should use more meaningful names than just s. A variable like pictureBox or pb would be much better because it's derived from the collection. The s does not have any meaning. Although in this case a rock would be perfect.



Health &amp; Damage


health -= 10;



This operation is not clear at first and maybe you have other places where you need to decrease health. Consider using constants and a helper method for this.

private static class Damage
{
    public const int WhenHitRock = 10;
}

void DecreaseHealth(int value)
{
     health -= value;
}




Everything together

The result of applying all suggestions and proper names would be a self-documenting code that no longer has to be commented.

When you write comments you only should explain why you are doing something because the code already shows what.

foreach (var rock in rocks)
{       
    var isPlayerRockCollision = rock.Rectangle().IntesectsWith(player.Rectangle());
    if (isPlayerRockCollision)
    {
        DecreaseHealthBy(Damage.WhenHitRock);
        damagable = false;
        impactHit.Play();
        return;
    }
}


Notice that there is a return inside the if. You set the demagable to false so I think it's not necessary to test other rocks for a hit. You can stop at the first one.