The code below is in my sprite class, when the sprite touches any enemies it goes to the location however the life counter doesn't decrease. When I remove the code below, the sprite doesn't go to the location and goes through the enemies but it decreases the life counter.
if(isTouching(OBSTACLES.class)) { setLocation(25,773); }