1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | /** this method does the animation */ public void animation() { if ( //I do not move, do not execute the following") //my movement is "left", "right", "up", "down") if (getImage() == spredteBen) { setImage(samledeBen); } else { setImage(spredteBen); } } |
1 | if (Greenfoot.getKey == ! "left" || "right" || "up" || "down" ) |