[GREENFOOT-190] custom actor drawing and acting order comparisons
To be able to set custom comparators rather then just setting the order to draw/act the actors solely by their class. So for example you could set a comparator that would draw actors in the order of the y axis to give a sense of depth to the scenario (actors at the front are always drawn on top of those behind). It would also allow the user to build comparators which provide a mix of having some classes always act/draw first/last (such as overlays to a scenario) and then the other actors can then act/draw in a completely different order.
Currently this can be achieved for drawing by overriding the getImage method on actors to always return null, their getWidth and getHeight methods to return the correct width/height values, and then manually draw the actors in the required order to the worlds background image in the worlds act method. However this adds overhead and is messy to setup and would be useful to have included.
Issue metadata
- Issue type: Task
- Priority: Low
- Fix versions: 2.0