I do feel bad, I don't want to be nagging but since there aren't 3rd-party resources for most of my questions, and I'm occasionally bumping into problems that I can't seem to figure out, I don't think I have anywhere else to go.
I'm trying to work out multiple-scene situations now. I thought the first possibility sounded very easy to implement: use present_modal_scene to display a scene on top of the original one. Unfortunately, even though everything looks right to me and I'm doing it exactly the same way as the example games (as far as I can tell), I'm getting an error.
Secondarily, I don't see an elegant way to move between scenes. Currently I have noticed that I can create another scene and run it whenever I want but it just puts it on top of the previous one, which is still running in the background and when I hit the "x", it takes me to the original scene. That doesn't seem like an ideal outcome.
So, the first problem. Here's my modal scene code:
import scene
import ui
class Scene1(scene.Scene):
def __init__(self):
pass
def touch_began(self, touch):
self.menu = Scene2()
self.present_modal_scene(self.menu)
class Scene2(scene.Scene):
def __init__(self):
pass
scene.run(Scene1())
When I run that code it starts fine but when I tap to bring up the second scene, I get this error:
ValueError: max() arg is an empty sequence
I'm very stumped. I feel like it couldn't be a simpler thing but I've hit a wall.
The second problem (the general ability to switch between scenes), I don't even know where to begin with because I can't find any examples or info in the documentation.
Sorry for asking so many questions!