You asked for attacking on collision..
You never said the enemy moved towards the player..
Mirroring the enemy should be pretty easy based on if the enemy is moving left or right (which would be based on the position of the player I guess)..
Without an example of what you have done so far, the answers you get are based on what we think you are doing..
I'm not sure what you mean by a line of sight function playing an animation..
Also the four direction part throws me a bit of, what if the player is at a different angle from the 4 directions the enemy is able to move?