I have a scrolling background in Level1World and I'm adding heart objects in the superclassWorld. I want to add life (heart objects) over the background objects because right now they're being covered. I don't know what to do.
I have a scrolling background in Level1World and I'm adding heart objects in the superclassWorld. I want to add life (heart objects) over the background objects because right now they're being covered. I don't know what to do.
You can just use the setPaintOrder method in your World subclass constructor:
public Level1World()
{
super(600, 400, 1);
setPaintOrder(Heart.class);
// etc.