diff --git a/Assets/Prefabs/UI/MainMenu/MainMenu_MainSection_Button.prefab b/Assets/Prefabs/UI/MainMenu/MainMenu_MainSection_Button.prefab index 2bc6c95..60c6740 100644 --- a/Assets/Prefabs/UI/MainMenu/MainMenu_MainSection_Button.prefab +++ b/Assets/Prefabs/UI/MainMenu/MainMenu_MainSection_Button.prefab @@ -10,7 +10,6 @@ GameObject: m_Component: - component: {fileID: 9191027406383050450} - component: {fileID: 8955510345104583901} - - component: {fileID: 2688279432479357738} - component: {fileID: 8767016043652635789} - component: {fileID: 707921383773482104} m_Layer: 5 @@ -47,20 +46,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 5815716451519897219} m_CullTransparentMesh: 1 ---- !u!114 &2688279432479357738 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5815716451519897219} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 432850bd465c4addae52a7e429d83d03, type: 3} - m_Name: - m_EditorClassIdentifier: - option: 0 - button: {fileID: 707921383773482104} --- !u!114 &8767016043652635789 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/MainMenuScene.unity b/Assets/Scenes/MainMenuScene.unity index ea926f0..86d3ef5 100644 --- a/Assets/Scenes/MainMenuScene.unity +++ b/Assets/Scenes/MainMenuScene.unity @@ -119,11 +119,6 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} ---- !u!1 &68398554 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 5815716451519897219, guid: cf83b23c655b8de4b906e9dfafcc199a, type: 3} - m_PrefabInstance: {fileID: 128676090550662149} - m_PrefabAsset: {fileID: 0} --- !u!1 &289873144 GameObject: m_ObjectHideFlags: 0 @@ -293,6 +288,127 @@ MonoBehaviour: m_MipBias: 0 m_VarianceClampScale: 0.9 m_ContrastAdaptiveSharpening: 0 +--- !u!1 &400207012 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 400207013} + - component: {fileID: 400207016} + - component: {fileID: 400207015} + - component: {fileID: 400207014} + m_Layer: 5 + m_Name: ExitButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &400207013 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 400207012} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1342868981} + m_Father: {fileID: 1297055849} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: -20} + m_SizeDelta: {x: 256, y: 100} + m_Pivot: {x: 1, y: 1} +--- !u!114 &400207014 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 400207012} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.990566, g: 0.82984877, b: 0.54668033, a: 1} + m_PressedColor: {r: 1, g: 0.63793105, b: 0, a: 1} + m_SelectedColor: {r: 1, g: 0.75371855, b: 0.3160377, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1342868982} + m_OnClick: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &400207015 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 400207012} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.5188679, g: 0.39404592, b: 0.43565327, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &400207016 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 400207012} + m_CullTransparentMesh: 1 --- !u!1 &410087039 GameObject: m_ObjectHideFlags: 0 @@ -570,6 +686,17 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!114 &674546606 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 707921383773482104, guid: cf83b23c655b8de4b906e9dfafcc199a, type: 3} + m_PrefabInstance: {fileID: 674546603} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1001 &700649130 PrefabInstance: m_ObjectHideFlags: 0 @@ -695,6 +822,17 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!114 &700649133 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 707921383773482104, guid: cf83b23c655b8de4b906e9dfafcc199a, type: 3} + m_PrefabInstance: {fileID: 700649130} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &832575517 GameObject: m_ObjectHideFlags: 0 @@ -840,6 +978,7 @@ RectTransform: m_Children: - {fileID: 1346018963} - {fileID: 1564944611} + - {fileID: 1297055849} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} @@ -847,6 +986,85 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0, y: 0} +--- !u!1 &1044538871 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1044538872} + - component: {fileID: 1044538874} + - component: {fileID: 1044538873} + m_Layer: 5 + m_Name: Title + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1044538872 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1044538871} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1297055849} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: -50} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &1044538873 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1044538871} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 120 + m_FontStyle: 1 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 126 + m_Alignment: 1 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: OPTIONS +--- !u!222 &1044538874 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1044538871} + m_CullTransparentMesh: 1 --- !u!1 &1071216082 GameObject: m_ObjectHideFlags: 0 @@ -909,6 +1127,190 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1297055848 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1297055849} + - component: {fileID: 1297055852} + - component: {fileID: 1297055851} + - component: {fileID: 1297055850} + - component: {fileID: 1297055853} + m_Layer: 5 + m_Name: OptionSection + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1297055849 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1297055848} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1044538872} + - {fileID: 400207013} + m_Father: {fileID: 929527709} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 2000, y: 1200} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1297055850 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1297055848} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ead545cf10db41be8f5a5f3c98ed970d, type: 3} + m_Name: + m_EditorClassIdentifier: + exitButton: {fileID: 400207014} +--- !u!114 &1297055851 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1297055848} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.16037738, g: 0.12482202, b: 0.13549486, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1297055852 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1297055848} + m_CullTransparentMesh: 1 +--- !u!114 &1297055853 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1297055848} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 73dc5050d8c64658b04553f9bfa96981, type: 3} + m_Name: + m_EditorClassIdentifier: + target: {fileID: 400207014} +--- !u!1 &1342868980 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1342868981} + - component: {fileID: 1342868983} + - component: {fileID: 1342868982} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1342868981 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1342868980} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 400207013} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1342868982 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1342868980} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 60 + m_FontStyle: 1 + m_BestFit: 0 + m_MinSize: 6 + m_MaxSize: 62 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: EXIT +--- !u!222 &1342868983 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1342868980} + m_CullTransparentMesh: 1 --- !u!1 &1346018962 GameObject: m_ObjectHideFlags: 0 @@ -1029,6 +1431,8 @@ GameObject: m_Component: - component: {fileID: 1564944611} - component: {fileID: 1564944612} + - component: {fileID: 1564944614} + - component: {fileID: 1564944613} m_Layer: 5 m_Name: MainSection m_TagString: Untagged @@ -1083,6 +1487,35 @@ MonoBehaviour: m_Spacing: {x: 0, y: 40} m_Constraint: 0 m_ConstraintCount: 2 +--- !u!114 &1564944613 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1564944610} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 73dc5050d8c64658b04553f9bfa96981, type: 3} + m_Name: + m_EditorClassIdentifier: + target: {fileID: 128676090550662151} +--- !u!114 &1564944614 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1564944610} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8ab5c85f25b14dccb95d374efa12c2d4, type: 3} + m_Name: + m_EditorClassIdentifier: + newGameButton: {fileID: 128676090550662151} + continueButton: {fileID: 1939027534} + optionButton: {fileID: 700649133} + quitButton: {fileID: 674546606} --- !u!1 &1847838555 GameObject: m_ObjectHideFlags: 0 @@ -1256,6 +1689,17 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!114 &1939027534 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 707921383773482104, guid: cf83b23c655b8de4b906e9dfafcc199a, type: 3} + m_PrefabInstance: {fileID: 1939027531} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1001 &128676090550662149 PrefabInstance: m_ObjectHideFlags: 0 @@ -1355,10 +1799,7 @@ PrefabInstance: m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] - m_AddedComponents: - - targetCorrespondingSourceObject: {fileID: 5815716451519897219, guid: cf83b23c655b8de4b906e9dfafcc199a, type: 3} - insertIndex: 2 - addedObject: {fileID: 128676090550662155} + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: cf83b23c655b8de4b906e9dfafcc199a, type: 3} --- !u!224 &128676090550662150 stripped RectTransform: @@ -1370,25 +1811,12 @@ MonoBehaviour: m_CorrespondingSourceObject: {fileID: 707921383773482104, guid: cf83b23c655b8de4b906e9dfafcc199a, type: 3} m_PrefabInstance: {fileID: 128676090550662149} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 68398554} + m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!114 &128676090550662155 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 68398554} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 73dc5050d8c64658b04553f9bfa96981, type: 3} - m_Name: - m_EditorClassIdentifier: - target: {fileID: 128676090550662151} --- !u!1001 &631094560693547388 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/MainMenu/MainMenuManager.cs b/Assets/Scripts/MainMenu/MainMenuManager.cs index 8fe9f51..9684975 100644 --- a/Assets/Scripts/MainMenu/MainMenuManager.cs +++ b/Assets/Scripts/MainMenu/MainMenuManager.cs @@ -1,6 +1,7 @@ using System; using MedievalParty.Core; -using MedievalParty.MainMenu.State; +using MedievalParty.MainMenu.MainSection; +using MedievalParty.MainMenu.Option; using UnityEngine; namespace MedievalParty.MainMenu @@ -9,7 +10,16 @@ namespace MedievalParty.MainMenu { public static MainMenuManager Instance { get; private set; } - private IState _mainSectionState; + public event EventHandler
onSectionChange; + + public enum Section + { + Main, + Option + } + + private MainManuManager_MainSectionState _mainSectionState; + private MainMenuManager_OptionState _optionState; private void Awake() { @@ -28,8 +38,28 @@ namespace MedievalParty.MainMenu base.Start(); _mainSectionState = new MainManuManager_MainSectionState(); + _optionState = new MainMenuManager_OptionState(); - ChangeState(_mainSectionState); + _mainSectionState.onOptionTrigger += (_, _) => ChangeSection(Section.Option); + _optionState.onExitTrigger += (_, _) => ChangeSection(Section.Main); + + ChangeSection(Section.Main); + } + + private void ChangeSection(Section section) + { + switch (section) + { + case Section.Main: + ChangeState(_mainSectionState); + onSectionChange?.Invoke(this, Section.Main); + break; + + case Section.Option: + ChangeState(_optionState); + onSectionChange?.Invoke(this, Section.Option); + break; + } } } } \ No newline at end of file diff --git a/Assets/Scripts/MainMenu/MainMenuManager.cs.meta b/Assets/Scripts/MainMenu/MainMenuManager.cs.meta index d09433a..ef66486 100644 --- a/Assets/Scripts/MainMenu/MainMenuManager.cs.meta +++ b/Assets/Scripts/MainMenu/MainMenuManager.cs.meta @@ -1,3 +1,11 @@ -fileFormatVersion: 2 +fileFormatVersion: 2 guid: 69c7971073c14a9c99ec27f16704ee93 -timeCreated: 1758824088 \ No newline at end of file +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 100 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/MainMenu/State.meta b/Assets/Scripts/MainMenu/MainSection.meta similarity index 100% rename from Assets/Scripts/MainMenu/State.meta rename to Assets/Scripts/MainMenu/MainSection.meta diff --git a/Assets/Scripts/MainMenu/MainSection/MainManuManager_MainSectionState.cs b/Assets/Scripts/MainMenu/MainSection/MainManuManager_MainSectionState.cs new file mode 100644 index 0000000..bb85e83 --- /dev/null +++ b/Assets/Scripts/MainMenu/MainSection/MainManuManager_MainSectionState.cs @@ -0,0 +1,42 @@ +using System; +using MedievalParty.Core; +using UnityEngine; + +namespace MedievalParty.MainMenu.MainSection +{ + public class MainManuManager_MainSectionState: IState + { + public event EventHandler onOptionTrigger; + + public void OnEnter() + { + UI_MainSection.Instance.onNewGameTrigger += UI_MainSection_OnNewGameTrigger; + UI_MainSection.Instance.onOptionTrigger += UI_MainSection_OnOptionTrigger; + UI_MainSection.Instance.onQuitTrigger += UI_MainSection_OnQuitTrigger; + } + + public void OnExit() + { + UI_MainSection.Instance.onNewGameTrigger -= UI_MainSection_OnNewGameTrigger; + UI_MainSection.Instance.onOptionTrigger -= UI_MainSection_OnOptionTrigger; + UI_MainSection.Instance.onQuitTrigger -= UI_MainSection_OnQuitTrigger; + } + + public void OnUpdate() { } + + private void UI_MainSection_OnQuitTrigger(object sender, EventArgs e) + { + Application.Quit(); + } + + private void UI_MainSection_OnOptionTrigger(object sender, EventArgs e) + { + onOptionTrigger?.Invoke(this, EventArgs.Empty); + } + + private void UI_MainSection_OnNewGameTrigger(object sender, EventArgs e) + { + SceneLoader.LoadScene(SceneLoader.SceneName.LobbyScene); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/MainMenu/State/MainManuManager_MainSectionState.cs.meta b/Assets/Scripts/MainMenu/MainSection/MainManuManager_MainSectionState.cs.meta similarity index 100% rename from Assets/Scripts/MainMenu/State/MainManuManager_MainSectionState.cs.meta rename to Assets/Scripts/MainMenu/MainSection/MainManuManager_MainSectionState.cs.meta diff --git a/Assets/Scripts/MainMenu/MainSectionOptions.cs b/Assets/Scripts/MainMenu/MainSection/MainSectionOptions.cs similarity index 69% rename from Assets/Scripts/MainMenu/MainSectionOptions.cs rename to Assets/Scripts/MainMenu/MainSection/MainSectionOptions.cs index 0a459d2..690c05a 100644 --- a/Assets/Scripts/MainMenu/MainSectionOptions.cs +++ b/Assets/Scripts/MainMenu/MainSection/MainSectionOptions.cs @@ -1,4 +1,4 @@ -namespace MedievalParty.MainMenu +namespace MedievalParty.MainMenu.MainSection { public enum MainSectionOptions { diff --git a/Assets/Scripts/MainMenu/MainSectionOptions.cs.meta b/Assets/Scripts/MainMenu/MainSection/MainSectionOptions.cs.meta similarity index 100% rename from Assets/Scripts/MainMenu/MainSectionOptions.cs.meta rename to Assets/Scripts/MainMenu/MainSection/MainSectionOptions.cs.meta diff --git a/Assets/Scripts/MainMenu/MainSection/UI_MainSection.cs b/Assets/Scripts/MainMenu/MainSection/UI_MainSection.cs new file mode 100644 index 0000000..3f9405a --- /dev/null +++ b/Assets/Scripts/MainMenu/MainSection/UI_MainSection.cs @@ -0,0 +1,46 @@ +using System; +using UnityEngine; +using UnityEngine.UI; + +namespace MedievalParty.MainMenu.MainSection +{ + public class UI_MainSection: MonoBehaviour + { + public static UI_MainSection Instance { get; private set; } + + public event EventHandler onNewGameTrigger; + public event EventHandler onContinueTrigger; + public event EventHandler onOptionTrigger; + public event EventHandler onQuitTrigger; + + [SerializeField] private Button newGameButton; + [SerializeField] private Button continueButton; + [SerializeField] private Button optionButton; + [SerializeField] private Button quitButton; + + private void Awake() + { + if (Instance) + { + Debug.LogWarning($"{typeof(UI_MainSection)} already exist! {transform}"); + Destroy(gameObject); + return; + } + + Instance = this; + } + + private void Start() + { + newGameButton.onClick.AddListener(() => onNewGameTrigger?.Invoke(this, EventArgs.Empty)); + continueButton.onClick.AddListener(() => onContinueTrigger?.Invoke(this, EventArgs.Empty)); + optionButton.onClick.AddListener(() => onOptionTrigger?.Invoke(this, EventArgs.Empty)); + quitButton.onClick.AddListener(() => onQuitTrigger?.Invoke(this, EventArgs.Empty)); + + MainMenuManager.Instance.onSectionChange += + (_, section) => gameObject.SetActive(section == MainMenuManager.Section.Main); + + gameObject.SetActive(false); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/MainMenu/MainSection/UI_MainSection.cs.meta b/Assets/Scripts/MainMenu/MainSection/UI_MainSection.cs.meta new file mode 100644 index 0000000..fe7416f --- /dev/null +++ b/Assets/Scripts/MainMenu/MainSection/UI_MainSection.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 8ab5c85f25b14dccb95d374efa12c2d4 +timeCreated: 1758831782 \ No newline at end of file diff --git a/Assets/Scripts/MainMenu/Option.meta b/Assets/Scripts/MainMenu/Option.meta new file mode 100644 index 0000000..5982ae6 --- /dev/null +++ b/Assets/Scripts/MainMenu/Option.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 1e39705b20694e3f8355103480b40e23 +timeCreated: 1758831310 \ No newline at end of file diff --git a/Assets/Scripts/MainMenu/Option/MainMenuManager_OptionState.cs b/Assets/Scripts/MainMenu/Option/MainMenuManager_OptionState.cs new file mode 100644 index 0000000..af3c7e6 --- /dev/null +++ b/Assets/Scripts/MainMenu/Option/MainMenuManager_OptionState.cs @@ -0,0 +1,26 @@ +using System; +using MedievalParty.Core; + +namespace MedievalParty.MainMenu.Option +{ + public class MainMenuManager_OptionState: IState + { + public event EventHandler onExitTrigger; + + public void OnEnter() + { + UI_OptionSection.Instance.onExitTrigger += OptionSection_OnExitTrigger; + } + + public void OnExit() + { + UI_OptionSection.Instance.onExitTrigger -= OptionSection_OnExitTrigger; + } + public void OnUpdate() { } + + private void OptionSection_OnExitTrigger(object sender, EventArgs e) + { + onExitTrigger?.Invoke(this, EventArgs.Empty); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/MainMenu/Option/MainMenuManager_OptionState.cs.meta b/Assets/Scripts/MainMenu/Option/MainMenuManager_OptionState.cs.meta new file mode 100644 index 0000000..c5530a6 --- /dev/null +++ b/Assets/Scripts/MainMenu/Option/MainMenuManager_OptionState.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: f55f0a0d05aa4e83a9cbc3d406dee988 +timeCreated: 1758831322 \ No newline at end of file diff --git a/Assets/Scripts/MainMenu/Option/UI_OptionSection.cs b/Assets/Scripts/MainMenu/Option/UI_OptionSection.cs new file mode 100644 index 0000000..65580ff --- /dev/null +++ b/Assets/Scripts/MainMenu/Option/UI_OptionSection.cs @@ -0,0 +1,38 @@ +using System; +using UnityEngine; +using UnityEngine.Serialization; +using UnityEngine.UI; + +namespace MedievalParty.MainMenu.Option +{ + public class UI_OptionSection: MonoBehaviour + { + public static UI_OptionSection Instance { get; private set; } + + public event EventHandler onExitTrigger; + + [SerializeField] private Button exitButton; + + private void Awake() + { + if (Instance) + { + Debug.LogWarning($"{typeof(UI_OptionSection)} already exist! {transform}"); + Destroy(gameObject); + return; + } + + Instance = this; + } + + private void Start() + { + exitButton.onClick.AddListener(() => onExitTrigger?.Invoke(this, EventArgs.Empty)); + + MainMenuManager.Instance.onSectionChange += + (_, section) => gameObject.SetActive(section == MainMenuManager.Section.Option); + + gameObject.SetActive(false); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/MainMenu/Option/UI_OptionSection.cs.meta b/Assets/Scripts/MainMenu/Option/UI_OptionSection.cs.meta new file mode 100644 index 0000000..e862dec --- /dev/null +++ b/Assets/Scripts/MainMenu/Option/UI_OptionSection.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: ead545cf10db41be8f5a5f3c98ed970d +timeCreated: 1758831373 \ No newline at end of file diff --git a/Assets/Scripts/MainMenu/State/MainManuManager_MainSectionState.cs b/Assets/Scripts/MainMenu/State/MainManuManager_MainSectionState.cs deleted file mode 100644 index 41ebe1c..0000000 --- a/Assets/Scripts/MainMenu/State/MainManuManager_MainSectionState.cs +++ /dev/null @@ -1,44 +0,0 @@ -using MedievalParty.Core; -using UnityEngine; - -namespace MedievalParty.MainMenu.State -{ - public class MainManuManager_MainSectionState: IState - { - public void OnEnter() - { - UI_MainSectionButton.OnAnyMainSectionButtonTrigger += UI_MainSectionButton_OnAnyMainSectionButtonTrigger; - } - - public void OnExit() - { - UI_MainSectionButton.OnAnyMainSectionButtonTrigger -= UI_MainSectionButton_OnAnyMainSectionButtonTrigger; - } - - public void OnUpdate() { } - - private void UI_MainSectionButton_OnAnyMainSectionButtonTrigger(object sender, MainSectionOptions e) - { - switch (e) - { - case MainSectionOptions.NewGame: - SceneLoader.LoadScene(SceneLoader.SceneName.LobbyScene); - break; - - case MainSectionOptions.Continue: - break; - - case MainSectionOptions.Options: - break; - - case MainSectionOptions.Quit: - Application.Quit(); - break; - - default: - Debug.LogWarning($"State {e} isn't handled!"); - break; - } - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/MainMenu/UI_MainSectionButton.cs b/Assets/Scripts/MainMenu/UI_MainSectionButton.cs deleted file mode 100644 index 1608288..0000000 --- a/Assets/Scripts/MainMenu/UI_MainSectionButton.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using UnityEngine; -using UnityEngine.UI; - -namespace MedievalParty.MainMenu -{ - public class UI_MainSectionButton: MonoBehaviour - { - public static event EventHandler OnAnyMainSectionButtonTrigger; - - [SerializeField] private MainSectionOptions option; - [SerializeField] private Button button; - - private void Start() - { - button.onClick.AddListener(() => OnAnyMainSectionButtonTrigger?.Invoke(this, option)); - } - - private void OnDestroy() - { - OnAnyMainSectionButtonTrigger = null; - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/MainMenu/UI_MainSectionButton.cs.meta b/Assets/Scripts/MainMenu/UI_MainSectionButton.cs.meta deleted file mode 100644 index 4f26df6..0000000 --- a/Assets/Scripts/MainMenu/UI_MainSectionButton.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 432850bd465c4addae52a7e429d83d03 -timeCreated: 1758825096 \ No newline at end of file diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index c176f0a..7beda25 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -11,6 +11,12 @@ EditorBuildSettings: - enabled: 1 path: Assets/Scenes/MainMenuScene.unity guid: e37d04771594923429804811d9fb52d3 + - enabled: 1 + path: Assets/Scenes/LoadingScene.unity + guid: cceaac2b9c15f434c94e4439de72d8a6 + - enabled: 1 + path: Assets/Scenes/LobbyScene.unity + guid: e1a76421e2668b34c9e542d79ab54357 m_configObjects: com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 052faaac586de48259a63d0c4782560b, type: 3} m_UseUCBPForAssetBundles: 0