If the mushroom walks into the player from the side

The player will be hurt.

To do this add a new zone to the mushroom

Use an Area2D and two CollisionShape2D