So, I want to change the image of an object. My teacher told us about methods that are already part of the Greenfoot-program? In a previous task, I had to implement a sound to be played with one of those methods (
).
Now I'm thinking, to change the Image of the Object there must be a similar method inside of Greenfoot ?
The question is, how such a method could look like. I've already tried
"class" here meaning the name of the class.
I hope my problem is somewhat understandable and someone can help :I
Thanks in advance
1 | Greenfoot.playSound( "sound.wav" ) |
1 | class .setImage( new GreenfootImage( "image.png" )) |