Hi I'm trying to make a game for my school project and I wanted to make it so that when the background changes an actor dies. Is that possible to do? Thanks
Use removeObject() or removeObjects() in the same method used to change the background
In the world, that could look something like;
public void changeBackground()
{
setImage("new-background");
removeObjects(getObjects(Object.class));
}
with Object.class being the class of objects you want to remove