From 00e615b5892b713ff3ab2c5c35b613c401676918 Mon Sep 17 00:00:00 2001 From: Siyuan Peng Date: Mon, 22 Apr 2024 16:20:35 -0400 Subject: [PATCH] Finish checkbox checking --- Assets/Scenes/WelcomeScene.unity | 589 ++++++++++++++++------------ Assets/Scripts/NextBtnController.cs | 62 +-- 2 files changed, 373 insertions(+), 278 deletions(-) diff --git a/Assets/Scenes/WelcomeScene.unity b/Assets/Scenes/WelcomeScene.unity index 68c41da5..0d8b12be 100644 --- a/Assets/Scenes/WelcomeScene.unity +++ b/Assets/Scenes/WelcomeScene.unity @@ -285,8 +285,8 @@ RectTransform: - {fileID: 652691017} - {fileID: 1040491325} - {fileID: 1088801428} - - {fileID: 1676848790} - - {fileID: 125189665} + - {fileID: 1523551612} + - {fileID: 442574397} m_Father: {fileID: 0} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -312,103 +312,6 @@ MonoBehaviour: m_BlockingMask: serializedVersion: 2 m_Bits: 31 ---- !u!1 &125189664 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 125189665} - - component: {fileID: 125189668} - - component: {fileID: 125189667} - - component: {fileID: 125189666} - m_Layer: 0 - m_Name: ISDK_RayInteraction - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &125189665 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 125189664} - 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: 1935492255} - m_Father: {fileID: 103826311} - m_RootOrder: 5 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &125189666 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 125189664} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3} - m_Name: - m_EditorClassIdentifier: - m_IgnoreLayout: 1 - m_MinWidth: -1 - m_MinHeight: -1 - m_PreferredWidth: -1 - m_PreferredHeight: -1 - m_FlexibleWidth: -1 - m_FlexibleHeight: -1 - m_LayoutPriority: 1 ---- !u!114 &125189667 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 125189664} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3ffe41fe81087fa41a2062cc69b99615, type: 3} - m_Name: - m_EditorClassIdentifier: - _transferOnSecondSelection: 0 - _addNewPointsToFront: 0 - _forwardElement: {fileID: 0} - _canvas: {fileID: 103826310} ---- !u!114 &125189668 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 125189664} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: bb86ba9d4c5126e48bfef9b0c9550e9d, type: 3} - m_Name: - m_EditorClassIdentifier: - _interactorFilters: [] - _maxInteractors: -1 - _maxSelectingInteractors: -1 - _data: {fileID: 0} - _pointableElement: {fileID: 125189667} - _surface: {fileID: 1935492258} - _selectSurface: {fileID: 1935492259} - _movementProvider: {fileID: 0} - _tiebreakerScore: 0 --- !u!1 &232063223 GameObject: m_ObjectHideFlags: 0 @@ -671,6 +574,110 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 392966200} m_CullTransparentMesh: 1 +--- !u!1 &442574396 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 442574397} + - component: {fileID: 442574398} + - component: {fileID: 442574399} + m_Layer: 0 + m_Name: BtnInteractable + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &442574397 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 442574396} + 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: 1676848790} + m_Father: {fileID: 103826311} + m_RootOrder: 5 + 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: 100, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &442574398 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 442574396} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1464721f2283eb14e94a33e812b47be4, type: 3} + m_Name: + m_EditorClassIdentifier: + _interactableView: {fileID: 1523551615} + _whenHover: + m_PersistentCalls: + m_Calls: [] + _whenUnhover: + m_PersistentCalls: + m_Calls: [] + _whenSelect: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 442574399} + m_TargetAssemblyTypeName: NextBtnController, Assembly-CSharp + m_MethodName: NextBtnClick + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + _whenUnselect: + m_PersistentCalls: + m_Calls: [] + _whenInteractorViewAdded: + m_PersistentCalls: + m_Calls: [] + _whenInteractorViewRemoved: + m_PersistentCalls: + m_Calls: [] + _whenSelectingInteractorViewAdded: + m_PersistentCalls: + m_Calls: [] + _whenSelectingInteractorViewRemoved: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &442574399 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 442574396} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 379534438f1ffa94d89d074b27a9c41e, type: 3} + m_Name: + m_EditorClassIdentifier: + WelcomePage: {fileID: 652691016} + BeforeStartedPage: {fileID: 1040491324} + InstructionPage: {fileID: 1088801427} + NxtButton: {fileID: 1676848792} --- !u!1 &606817730 GameObject: m_ObjectHideFlags: 0 @@ -1927,6 +1934,102 @@ BoxCollider: serializedVersion: 2 m_Size: {x: 10, y: 2.220446e-16, z: 10} m_Center: {x: 0, y: 0, z: 0} +--- !u!1 &1085908444 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1085908445} + - component: {fileID: 1085908449} + - component: {fileID: 1085908448} + - component: {fileID: 1085908447} + - component: {fileID: 1085908446} + m_Layer: 0 + m_Name: Surface + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1085908445 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1085908444} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.9976817, y: 0.99973917, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1523551612} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.42072636, y: 0.058147464} + m_AnchorMax: {x: 0.5777064, y: 0.1157536} + m_AnchoredPosition: {x: -0.81077576, y: 411} + m_SizeDelta: {x: 1680.5592, y: 945.2972} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1085908446 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1085908444} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4bd1f1e23a51a7d428dd152466736b7a, type: 3} + m_Name: + m_EditorClassIdentifier: + _boundsClipper: {fileID: 1085908447} +--- !u!114 &1085908447 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1085908444} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e08ab46e8fb05dc46b34e54466dc11e3, type: 3} + m_Name: + m_EditorClassIdentifier: + _position: {x: 0, y: 0, z: 0} + _size: {x: 1994.5193, y: 1002.9033, z: 0.01} +--- !u!114 &1085908448 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1085908444} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: efd927768041afd4d90e5d822283f0f4, type: 3} + m_Name: + m_EditorClassIdentifier: + _planeSurface: {fileID: 1085908449} + _clippers: + - {fileID: 1085908447} +--- !u!114 &1085908449 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1085908444} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9cf2a74d69b1c1e41916d2a7afdff5be, type: 3} + m_Name: + m_EditorClassIdentifier: + _facing: 0 + _doubleSided: 0 --- !u!1 &1088801427 GameObject: m_ObjectHideFlags: 0 @@ -2778,6 +2881,134 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1406091210} m_CullTransparentMesh: 1 +--- !u!1 &1523551611 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1523551612} + - component: {fileID: 1523551615} + - component: {fileID: 1523551617} + - component: {fileID: 1523551614} + - component: {fileID: 1523551613} + - component: {fileID: 1523551616} + m_Layer: 0 + m_Name: ISDK_RayInteraction + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1523551612 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1523551611} + 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: 1085908445} + m_Father: {fileID: 103826311} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1523551613 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1523551611} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 1 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1523551614 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1523551611} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3ffe41fe81087fa41a2062cc69b99615, type: 3} + m_Name: + m_EditorClassIdentifier: + _transferOnSecondSelection: 0 + _addNewPointsToFront: 0 + _forwardElement: {fileID: 0} + _canvas: {fileID: 103826310} +--- !u!114 &1523551615 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1523551611} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: bb86ba9d4c5126e48bfef9b0c9550e9d, type: 3} + m_Name: + m_EditorClassIdentifier: + _interactorFilters: [] + _maxInteractors: -1 + _maxSelectingInteractors: -1 + _data: {fileID: 0} + _pointableElement: {fileID: 1523551614} + _surface: {fileID: 1085908448} + _selectSurface: {fileID: 1085908449} + _movementProvider: {fileID: 0} + _tiebreakerScore: 0 +--- !u!114 &1523551616 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1523551611} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 10 +--- !u!114 &1523551617 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1523551611} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2518c50cb3fc6a6458d4b743c2f69c7d, type: 3} + m_Name: + m_EditorClassIdentifier: + m_SendPointerHoverToParent: 1 + _useInitialPressPositionForDrag: 1 --- !u!1 &1550826646 GameObject: m_ObjectHideFlags: 0 @@ -2835,7 +3066,7 @@ MonoBehaviour: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1550826646} - m_Enabled: 1 + m_Enabled: 0 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 4462db6b836045640a882a2a4e4022f7, type: 3} m_Name: @@ -3154,7 +3385,6 @@ GameObject: - component: {fileID: 1676848794} - component: {fileID: 1676848793} - component: {fileID: 1676848792} - - component: {fileID: 1676848791} - component: {fileID: 1676848795} m_Layer: 0 m_Name: NextBtn @@ -3176,30 +3406,14 @@ RectTransform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1014555251} - m_Father: {fileID: 103826311} - m_RootOrder: 4 + m_Father: {fileID: 442574397} + m_RootOrder: 0 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: -414} m_SizeDelta: {x: 320, y: 60} m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1676848791 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1676848789} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 379534438f1ffa94d89d074b27a9c41e, type: 3} - m_Name: - m_EditorClassIdentifier: - WelcomePage: {fileID: 0} - BeforeStartedPage: {fileID: 0} - InstructionPage: {fileID: 0} - NxtButton: {fileID: 1676848792} --- !u!114 &1676848792 MonoBehaviour: m_ObjectHideFlags: 0 @@ -3222,7 +3436,7 @@ MonoBehaviour: m_Transition: 1 m_Colors: m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_HighlightedColor: {r: 0.990566, g: 0.051397298, b: 0.051397298, a: 1} m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} @@ -3282,43 +3496,20 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1676848789} m_CullTransparentMesh: 1 ---- !u!114 &1676848795 -MonoBehaviour: +--- !u!64 &1676848795 +MeshCollider: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1676848789} + m_Material: {fileID: 0} + m_IsTrigger: 0 m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1464721f2283eb14e94a33e812b47be4, type: 3} - m_Name: - m_EditorClassIdentifier: - _interactableView: {fileID: 0} - _whenHover: - m_PersistentCalls: - m_Calls: [] - _whenUnhover: - m_PersistentCalls: - m_Calls: [] - _whenSelect: - m_PersistentCalls: - m_Calls: [] - _whenUnselect: - m_PersistentCalls: - m_Calls: [] - _whenInteractorViewAdded: - m_PersistentCalls: - m_Calls: [] - _whenInteractorViewRemoved: - m_PersistentCalls: - m_Calls: [] - _whenSelectingInteractorViewAdded: - m_PersistentCalls: - m_Calls: [] - _whenSelectingInteractorViewRemoved: - m_PersistentCalls: - m_Calls: [] + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 0} --- !u!1 &1896575321 GameObject: m_ObjectHideFlags: 0 @@ -3596,102 +3787,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1932512556} m_CullTransparentMesh: 1 ---- !u!1 &1935492254 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1935492255} - - component: {fileID: 1935492259} - - component: {fileID: 1935492258} - - component: {fileID: 1935492257} - - component: {fileID: 1935492256} - m_Layer: 0 - m_Name: Surface - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1935492255 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1935492254} - 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: 125189665} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1935492256 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1935492254} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4bd1f1e23a51a7d428dd152466736b7a, type: 3} - m_Name: - m_EditorClassIdentifier: - _boundsClipper: {fileID: 1935492257} ---- !u!114 &1935492257 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1935492254} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: e08ab46e8fb05dc46b34e54466dc11e3, type: 3} - m_Name: - m_EditorClassIdentifier: - _position: {x: 0, y: 0, z: 0} - _size: {x: 2000, y: 1000, z: 0.01} ---- !u!114 &1935492258 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1935492254} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: efd927768041afd4d90e5d822283f0f4, type: 3} - m_Name: - m_EditorClassIdentifier: - _planeSurface: {fileID: 1935492259} - _clippers: - - {fileID: 1935492257} ---- !u!114 &1935492259 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1935492254} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9cf2a74d69b1c1e41916d2a7afdff5be, type: 3} - m_Name: - m_EditorClassIdentifier: - _facing: 0 - _doubleSided: 0 --- !u!1 &2029782666 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/NextBtnController.cs b/Assets/Scripts/NextBtnController.cs index 64b3c8b1..95f6830e 100644 --- a/Assets/Scripts/NextBtnController.cs +++ b/Assets/Scripts/NextBtnController.cs @@ -11,26 +11,15 @@ public class NextBtnController : MonoBehaviour public GameObject BeforeStartedPage; public GameObject InstructionPage; private GameObject currentPage; - // public Button NxtButton; + public Button NxtButton; // public InteractableUnityEventWrapper interactableUnityEventWrapper; - + public Toggle BSPCheckBox1; + public Toggle BSPCheckBox2; + public Toggle BSPCheckBox3; public void NextBtnClick() { - Debug.LogWarning("Next Button is clicked"); - - // interactableUnityEventWrapper.WhenSelect.Invoke(); - - // - // - // - // - // - // - // - // - // - // + Debug.LogWarning("Clicked Once"); if (currentPage == WelcomePage) { @@ -48,17 +37,25 @@ public void NextBtnClick() { SceneManager.LoadScene("GameScene"); } + + NxtButton.interactable = false; // avoid double click } - public void doNothing() { } + public void WhenHover() + { + Color hoverColor = new Color(0.5f, 0.5f, 0.5f, 1.0f); + NxtButton.GetComponent().color = hoverColor; + } - void Start() + public void WhenUnhover() { - Debug.LogWarning("Next Btn Start()"); + // change back to white + Color normalColor = new Color(1.0f, 1.0f, 1.0f, 1.0f); + NxtButton.GetComponent().color = normalColor; + } - // WelcomePage = GameObject.Find("Menu Canvas/WelcomePage"); - // BeforeStartedPage = GameObject.Find("Menu Canvas/BeforeStartedPage"); - // InstructionPage = GameObject.Find("Menu Canvas/InstructionPage"); + void Start() + { if (WelcomePage == null) { Debug.LogError("WelcomePage "); @@ -71,28 +68,31 @@ void Start() { Debug.LogError("InstructionPage is not found"); } - // if (NxtButton == null) - // { - // Debug.LogError("Button is not found"); - // } currentPage = WelcomePage; + WelcomePage.SetActive(true); BeforeStartedPage.SetActive(false); InstructionPage.SetActive(false); + if (BSPCheckBox1 == null) + BSPCheckBox1 = GameObject.Find("ckbox1").GetComponent(); + if (BSPCheckBox2 == null) + BSPCheckBox2 = GameObject.Find("ckbox2").GetComponent(); + if (BSPCheckBox3 == null) + BSPCheckBox3 = GameObject.Find("ckbox3").GetComponent(); - - // call NextBtnClick when the button is clicked or selected - + if (BSPCheckBox1 == null) + { + Debug.LogError("CheckBox1 is not found"); + } - // NxtButton.on - // .AddListener(NextBtnClick); } // Update is called once per frame void Update() { + NxtButton.interactable = currentPage != BeforeStartedPage || (BSPCheckBox1.isOn && BSPCheckBox2.isOn && BSPCheckBox3.isOn); }