Menu
Last updated
Last updated
The Menu system is responsible for managing the menu functionality in the Candy Merge game. This includes handling the main menu, options menu, and various UI interactions. The system ensures that the menus are displayed correctly and interact with other game elements as intended.
Manages the menu functionality in the Candy Merge game. This class is a singleton that handles menu-related operations, such as playing the menu music when the script is initialized.
Key Responsibilities:
Playing Menu Music: Plays the "Menu Music" sound when the script is initialized.
Manages the canvas UI elements in the menu, including showing and hiding the main and options menus. This class handles the interactions between different UI elements and ensures that the correct menus are displayed.
Key Responsibilities:
Showing/Hiding Main Menu: Provides methods to show and hide the main menu.
Showing/Hiding Options Menu: Provides methods to show and hide the options menu.
Manages the UI for the options menu, handling animations and audio slider updates. This class ensures that the options menu is displayed correctly and that the audio settings are updated based on user input.
Key Responsibilities:
Managing Options Menu Animations: Controls the animations for opening and closing the options menu.
Updating Audio Sliders: Refreshes the audio sliders to reflect the current audio settings.
Displaying the Options Menu: The OptionsUIManager class handles the display of the options menu, including triggering the appropriate animations and refreshing the audio sliders to reflect the current settings.
Updating Audio Settings: When the options menu is shown, the OptionsUIManager class updates the audio sliders to match the current audio settings, ensuring that any changes made by the player are accurately reflected.
Manages the main UI interactions, including showing, hiding, and triggering game start/exit events. This class handles the main menu functionality and ensures that the game starts or exits correctly based on user input.
Key Responsibilities:
Showing/Hiding Main Menu: Provides methods to show and hide the main menu.
Starting the Game: Loads the LEVEL scene to start the game.
Exiting the Application: Exits the application or stops the play mode in the Unity Editor.
Starting the Game: The MainUIManager class handles the transition from the main menu to the game scene, ensuring that the game starts correctly when the player chooses to begin.
Exiting the Game: The MainUIManager class provides functionality to exit the game, either by quitting the application or stopping play mode in the Unity Editor.
By using the Menu system, you can manage the various aspects of the Candy Merge game's menus, such as the main menu, options menu, and UI interactions, providing a comprehensive and engaging user interface for players.