diff --git a/RunningLateGame/Assets/Scripts/OverlayCompleteUnderTimeMenu.cs b/RunningLateGame/Assets/Scripts/OverlayCompleteUnderTimeMenu.cs new file mode 100644 index 0000000..d499e36 --- /dev/null +++ b/RunningLateGame/Assets/Scripts/OverlayCompleteUnderTimeMenu.cs @@ -0,0 +1,22 @@ +/* + * author: mark joshwel + * date: 11/8/2024 + * description: TODO + */ + +/// +/// TODO +/// +public class OverlayCompleteUnderTimeMenu : CommonMenu +{ + /// + /// function to associate a display state with the menu, + /// and subscribe button events to their respective functions + /// + public override void OnEnable() + { + // set the associated state and call the base OnEnable + associatedState = GameManager.DisplayState.OverlayCompleteUnderTimeMenu; + base.OnEnable(); + } +} \ No newline at end of file diff --git a/RunningLateGame/Assets/Scripts/OverlayCompleteUnderTimeMenu.cs.meta b/RunningLateGame/Assets/Scripts/OverlayCompleteUnderTimeMenu.cs.meta new file mode 100644 index 0000000..7d1eb25 --- /dev/null +++ b/RunningLateGame/Assets/Scripts/OverlayCompleteUnderTimeMenu.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: d90104adf847428596a24cd16d00676e +timeCreated: 1723322846 \ No newline at end of file diff --git a/RunningLateGame/Assets/Scripts/OverlayFailedOverTimeMenu.cs b/RunningLateGame/Assets/Scripts/OverlayFailedOverTimeMenu.cs new file mode 100644 index 0000000..c453ca2 --- /dev/null +++ b/RunningLateGame/Assets/Scripts/OverlayFailedOverTimeMenu.cs @@ -0,0 +1,22 @@ +/* + * author: mark joshwel + * date: 11/8/2024 + * description: TODO + */ + +/// +/// TODO +/// +public class OverlayFailedOverTimeMenu : CommonMenu +{ + /// + /// function to associate a display state with the menu, + /// and subscribe button events to their respective functions + /// + public override void OnEnable() + { + // set the associated state and call the base OnEnable + associatedState = GameManager.DisplayState.OverlayFailedOverTimeMenu; + base.OnEnable(); + } +} \ No newline at end of file diff --git a/RunningLateGame/Assets/Scripts/OverlayFailedOverTimeMenu.cs.meta b/RunningLateGame/Assets/Scripts/OverlayFailedOverTimeMenu.cs.meta new file mode 100644 index 0000000..91ca3c4 --- /dev/null +++ b/RunningLateGame/Assets/Scripts/OverlayFailedOverTimeMenu.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 9dda88a82bad4822922db26f7f9f4266 +timeCreated: 1723322994 \ No newline at end of file diff --git a/RunningLateGame/Assets/Scripts/OverlayPauseMenu.cs b/RunningLateGame/Assets/Scripts/OverlayPauseMenu.cs new file mode 100644 index 0000000..b7e4eeb --- /dev/null +++ b/RunningLateGame/Assets/Scripts/OverlayPauseMenu.cs @@ -0,0 +1,22 @@ +/* + * author: mark joshwel + * date: 11/8/2024 + * description: TODO + */ + +/// +/// TODO +/// +public class OverlayPauseMenu : CommonMenu +{ + /// + /// function to associate a display state with the menu, + /// and subscribe button events to their respective functions + /// + public override void OnEnable() + { + // set the associated state and call the base OnEnable + associatedState = GameManager.DisplayState.OverlayPauseMenu; + base.OnEnable(); + } +} \ No newline at end of file diff --git a/RunningLateGame/Assets/Scripts/OverlayPauseMenu.cs.meta b/RunningLateGame/Assets/Scripts/OverlayPauseMenu.cs.meta new file mode 100644 index 0000000..85f2a76 --- /dev/null +++ b/RunningLateGame/Assets/Scripts/OverlayPauseMenu.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 06af012c6fb2403484f6b955d96c91db +timeCreated: 1723323029 \ No newline at end of file diff --git a/RunningLateGame/Assets/Scripts/ScreenMainMenu.cs b/RunningLateGame/Assets/Scripts/ScreenMainMenu.cs new file mode 100644 index 0000000..51e8c14 --- /dev/null +++ b/RunningLateGame/Assets/Scripts/ScreenMainMenu.cs @@ -0,0 +1,86 @@ +/* + * author: mark joshwel + * date: 11/8/2024 + * description: script for handling main menu button functions + */ + +using UnityEngine; +using UnityEngine.UIElements; + +/// +/// class managing the main menu and button function invocations +/// +public class ScreenMainMenu : CommonMenu +{ + /// + /// button to quit game + /// + public Button ButtonExit; + + /// + /// button to show the options menu + /// + public Button ButtonOptions; + + /// + /// button to play game + /// + public Button ButtonPlay; + + /// + /// function to associate a display state with the menu, + /// and subscribe button events to their respective functions + /// + public override void OnEnable() + { + // set the associated state and call the base OnEnable + associatedState = GameManager.DisplayState.ScreenMainMenu; + base.OnEnable(); + + // get the start button from the ui root and subscribe appropriate functions + ButtonPlay = UI.Q