I've been trying to create classes that use multiple different images in an array, but I want to set the contents of the array before the constructor so that I don't have to create a number of images whenever the object is created. I thought it was something like this:
But that's not working. Can someone help me out please?
1 2 3 4 5 | private GreenfootImage[] images = new GreenfootImage[ 10 ] [ new GreenfootImage( "bullet" ), new GreenfootImage( "shotgun_pellet" ); ] |