Are you referring to this demo? Because there is no demo called "Dynamic Character Controlled 2D Platformer"... If so, add the following lines to the enemy script:
if $DetectFloorLeft.is_colliding() or $DetectFloorRight.is_colliding():
linear_velocity.y = 0
before the line containing the call to
move_and_slide. This will disable gravity when one of the two downward pointing rays collides with the ground.