if(karotteAtLocation != null && karotteAtLocation.isEaten == false)
Actor karotteAtLocation = getOneObjectAtOffset(0, 0, karotte.class); if(karotteAtLocation != null && karotte.isEaten == false) { karotteAtLocation.setImage("null.png"); karotteAtLocation.isEaten = true; }