I'm making a program where each "scene" of the story told is a void method, when one scene finishes its code (dialogue for example) then the program's "game state" changes into the next scene.
There are 8 counting the start menu + credits but the problem starts as the program goes on from the first two scenes since it starts getting larger and the dialogue is typed slower than in the first scenes.
I concluded when a scene passes onto the next scene/method the last one keeps running in the background.
Is there a way to fix this or a better way?
I tried noLoop(); before switching to the next scene but this stops the program.
I tried separating the scenes into different parts as more methods but the problem remained.
Code is confidential.