Add a new script to the Enemy node
Speed
Gravity
Facing direction
In physics process add gravity
Flip the sprite to face direction of travel
Call move and slide to register collisions
Check if any collision was with the player
If it was call the hurt function
If the normal is not 0, we have hit a wall
Bounce the enemy off the wall
Finally, if the enemy falls of a platform
The enemy should detect ledges
Add a RayCast2D as a child of Enemy
Rename it to FloorDetector
Set Target Position to 0, 25
Slightly ahead of the enemy
You can add a constant for this
Keep the detector ahead of the enemy
Add a check in physics process
Add an instance of the Enemy Scene to your Level01 Scene and play test.