After I hit an enemy I want do be untouchable (for running away i.e.). Somebody's got a clue how to do that? Here's my code so far
public void jumpBackWhenHit(int jumpHeight){
// bepaal richting
// jump back when hit
Actor actor = getOneIntersectingObject(RibbonPig.class);
if(actor != null){
System.out.println("I've been hit");
// get back a little in x-direction
flickeringRogue();
jump(jumpHeight);
}
// be untouchable for 2 seconds
}

