there are a number of ways to handle the scene changes, e.g. state machines that we use in some of our examples. I’d recommend having a look at this tutorial, and in your case especially this part can be of most interest.
(anyway it’s a short tutorial so take some minutes and read the whole thing!
If there are still questions left after, I’m happy to help you!