I would be interested to see how you coded this. It is not simple code. How much help did you get for this? I created a working model of it and realized how involved it was. I only used Actor objects for the clickable boxes. I thought that having actors for the main grid would just make things more difficult to deal with.
Two issues: (1) color box of current color should be inactive (or at least not count as a step when clicked); (2) a static array is preventing a clean reset.
Field declaration:
GreenfootSound background_music;
In constructor:
if (background_music == null)
{
background_music = new GreenfootSound("Background_music.mp3");
}
@SwaggyXiao, please refer to my Scrolling Tutorial scenario on image scrolling (see main text and link at bottom on "Actor follow scrolling code"). The scenario is located at:
https://www.greenfoot.org/scenarios/18226
Scaling and re-scaling an image will usually distort and eventually "destroy" an image. Better would be to copy the image and scale it once; then go back and forth setting the appropriate image.
2021/2/27
Value Display Tutorial
2021/2/26
Color It!
2021/2/26
Color It!
2021/2/16
Scrolling SuperWorld
2021/2/4
Fractal Fun
2021/1/27
Benny's Tower Defense
2021/1/27
Benny's Tower Defense
2021/1/25
Scrolling SuperWorld
2021/1/14
Button Click Example