Hi there,
I want to try out a new framework and started with a Minesweeper clone. There are 3 scenes to consider
-
Main Menu
-
Play Button => Load the board configuration scene
-
Options Button ( … not yet … ) => Load the options scene
-
Quit Button => Quit the game
-
Board Configuration
-
Start game with specific settings button ( it’s a prefab for 3 different settings ) => Load the game scene
-
Back Button => Load the main menu scene
-
Game
-
Back To Board Configuration Button => Load the board configuration scene
-
Back To Main Menu Button => Load the main menu scene
-
Quit Button => Quit the game
As you can see there is some similiar logic. I don’t want to create a script “MainMenu” and hardcode the logic because I can also reuse it somewhere else.
When creating a script, e.g. “LoadScene”, configure the scene variable and attach it to a button this works fine BUT I won’t be able to run some additional logic ( e.g. assign the selected board configuration, play an animation before changing the scene etc. )
How did you guys solve this? Do you hardcode the menus?
Thanks in advance!