I have an enemy in my game and when it hits a wall it rotates by 180, when it hits the next wall it doesn't do anything (thats because the image is already at 180), so how would i do an opposite rotation that flips the image every time?
Code:
private void touchingWall() { move(3); if (getOneIntersectingObject(Wall.class) !=null) { setRotation(180); } }