An object is added into a world but it is shown over the hero. is there code to display and object over another.


1 | setPaintOrder(ClassOnTop. class , ClassBelow. class ); |
1 2 3 4 | int x=getX(), y=getY(); World w = getWorld(); w.removeObject( this ); w.addObject( this , x, y); |