Sorry if this has an obvious answer, I just haven’t found the blocks/examples. How do you transition from scene to scene with a fade animation?
Currently when I have multiple scenes I use a state type machine (I hate fancy titles for things, it’s just a big if check):
switch (currentState) {
case States.Menu:
Menu.init()
break;
case States.Game:
Game.init()
break;
.. etc etc
}
When a scene is complete I call back to this and set the new State to whatever needs to be next (example: Push A on Menu, it callsback and this top level code will say “ok now make the state be Game”).
How does everyone transition this type of switch using fade out? Mine just flips to the next scene.
Sorry this isn’t in blocks, I assume there’s a lot fo large if/else blocks that people use to manage what the current scene is, so same-ish question using large if/else blocks.