As the title says I'm having trouble using two worlds. I'm changing between two worlds (with the exact same code, and the only difference is the size), and the problem is that I'm using the same actors for both worlds, so the actor's method only works for one of the levels, when I use methods like this:
The other world is called Puzzle2, which means that this method will call a world that doesn't exist (when Puzzle2 is active). Is there an easy way to fix this or do I have to create a new actor with the exact same code and just change this one method to:
This would be easy, but it would require more space. (I have 5 actors with the same problem, just to point out that this fix would require some space)
public void die() { ((Puzzle) getWorld()).resetLevel(); }
public void die() { ((Puzzle2) getWorld()).resetLevel(); }