Hi, guys!
Could someone say me, what’s wrong there and how to solve it?
I just tried some things, but i don’t know exactly, what greenfoot want’s, the constructor is existing...
And how can i let Greenfoot set an Actor (optical) over another?

1 | super ( 0 , sp, world); |
1 2 3 | public Wallpiece() { } |
1 2 3 | move( 3 ); Wallpiece wp= new Wallpiece( 1 , this ,spf); spf.addObject(wp, getX(), getY()); |
1 2 3 4 5 6 7 8 | ArrayList<Wallpiece> collisionList = getIntersectingObjects(Wallpiece. class ); for (Wallpiece collisionObject : collisionList) { if (!collisionObject.isFirstColliding()) { // the Method you want to call } } |
1 2 3 4 5 6 7 8 9 | ArrayList<Wallpiece> collisionList = getIntersectingObjects(Wallpiece. class ); for (Wallpiece collisionObject : collisionList){ if (collisionObject.fresh== false ){ dead= true ; setImage( "Explosion.png" ); System.out.println(op + " hat gewonnen!" ); Greenfoot.stop(); } } |
1 2 3 4 5 6 7 8 9 10 11 | for (Object obj : getIntersectingObjects(Wallpiece. class )) { Wallpiece wallpiece = (Wallpiece) obj; if (!wallpiece.fresh) { dead= true ; setImage( "Explosion.png" ); System.out.println(op + " hat gewonnen!" ); Greenfoot.stop(); } } |