this code works find. all its doing is setting collsion around enemy. and if player touch player from right than player move to right. if player touch enemy from left than player move to left.
...