/* * author: mark joshwel * date: 29/5/2024 * description: main menu script for handling main menu button functions */ using UnityEngine; using UnityEngine.UIElements; /// /// class managing the main menu and button function invocations /// public class MainMenu : CommonMenu { /// /// button to play game /// public Button ButtonPlay; /// /// button to show options menu /// public Button ButtonOptions; /// /// button to show credits menu /// public Button ButtonCredits; /// /// button to quit game /// public Button ButtonExit; /// /// function to associate a display state with the menu, /// and subscribe button events to their respective functions /// public override void OnEnable() { associatedState = GameManager.DisplayState.ScreenMainMenu; base.OnEnable(); // get the start button from the ui root and subscribe appropriate functions ButtonPlay = UI.Q