added enemy hit aniimation
reworked enemy attack and playerattack function to add the hit animation
reworked when the game ends

- fixed a bug where the player would not attac