public void bewegung() { move(x); setLocation(getX(), getY()+2); Actor platform = getOneIntersectingObject(Plattform.class); setLocation(getX(), getY()-2); int pX = platform.getX(); int pW = platform.getImage().getWidth(); if ((x < 0 && pX-pW/2 >= getX()) || (x > 0 && pX+pW/2 <= getX())) { x = -x; } }

