From dfc69ddd7682bc097da0f8668f9b3d5a14d6d235 Mon Sep 17 00:00:00 2001 From: Dries Van Schuylenbergh Date: Tue, 14 Mar 2023 10:56:42 +0000 Subject: [PATCH] Resolve WES-99 "Cc refactor" --- Assets/Accounts/Scenes/ChangeUserScreen.unity | 21 +- Assets/Accounts/Scripts/ChangeUserScreen.cs | 21 +- Assets/Accounts/Scripts/Progress.cs | 1 - Assets/Accounts/Scripts/UserCreationScreen.cs | 11 +- Assets/Common/Prefabs/ButtonBack.prefab | 14 +- Assets/Common/Prefabs/ButtonUser.prefab | 13 - .../Prefabs/Theme Item.prefab} | 2 +- .../Prefabs/Theme Item.prefab.meta} | 0 .../{WebcamAuthorization.unity => Boot.unity} | 0 ...thorization.unity.meta => Boot.unity.meta} | 0 ...ourse.unity => CourseActivityScreen.unity} | 163 ++--- ...y.meta => CourseActivityScreen.unity.meta} | 0 ...esScreen.unity => CoursesMenuScreen.unity} | 24 + ...nity.meta => CoursesMenuScreen.unity.meta} | 0 ...StartScreen.unity => MainMenuScreen.unity} | 74 +-- ...n.unity.meta => MainMenuScreen.unity.meta} | 0 ...ame.unity => MinigameActivityScreen.unity} | 153 ++--- ...meta => MinigameActivityScreen.unity.meta} | 0 ...ction.unity => ThemeSelectionScreen.unity} | 2 +- ...y.meta => ThemeSelectionScreen.unity.meta} | 0 Assets/Common/Scripts/BackButton.cs | 15 + ...ceneOnClick.cs.meta => BackButton.cs.meta} | 2 +- .../{WebcamAuthorization.cs => BootScreen.cs} | 5 +- ...thorization.cs.meta => BootScreen.cs.meta} | 0 Assets/Common/Scripts/ChangeSceneOnClick.cs | 35 -- ...{InfoCourse.cs => CourseActivityScreen.cs} | 29 +- ...e.cs.meta => CourseActivityScreen.cs.meta} | 0 Assets/Common/Scripts/CourseItem.cs | 3 +- ...rseListManager.cs => ListCoursesScreen.cs} | 8 +- ...ager.cs.meta => ListCoursesScreen.cs.meta} | 0 ...eListManager.cs => ListMinigamesScreen.cs} | 5 +- ...er.cs.meta => ListMinigamesScreen.cs.meta} | 0 Assets/Common/Scripts/MainMenuScreen.cs | 57 ++ ...Manager.cs.meta => MainMenuScreen.cs.meta} | 0 Assets/Common/Scripts/Minigame.cs | 1 - ...oMinigame.cs => MinigameActivityScreen.cs} | 45 +- ...cs.meta => MinigameActivityScreen.cs.meta} | 0 Assets/Common/Scripts/MinigameItem.cs | 11 +- Assets/Common/Scripts/StartScreenManager.cs | 31 - Assets/Common/Scripts/SystemController.cs | 104 ++++ ...oller.cs.meta => SystemController.cs.meta} | 2 +- ...nController.cs => ThemeSelectionScreen.cs} | 15 +- .../Scripts/ThemeSelectionScreen.cs.meta} | 2 +- Assets/Common/Scripts/UserButton.cs | 5 +- .../{Course_0.unity => TemplateCourse.unity} | 565 ++++++------------ ...0.unity.meta => TemplateCourse.unity.meta} | 0 .../{StartPause.cs => TemplateCourse.cs} | 147 ++++- ...{Webcam.cs.meta => TemplateCourse.cs.meta} | 2 +- Assets/Courses/Scripts/Webcam.cs | 128 ---- Assets/SpellingBee/Scenes/Game.unity | 67 +-- Assets/SpellingBee/Scripts/GameController.cs | 5 +- .../SpellingBee/Scripts/SpellingBeeWebcam.cs | 20 +- Assets/users.json | 1 - Assets/users.json.meta | 7 - ProjectSettings/EditorBuildSettings.asset | 26 +- .../common/scripts/CourseMenuScreen.cs | 7 +- .../common/scripts/CourseMenuScreen.cs.meta | 0 57 files changed, 733 insertions(+), 1116 deletions(-) rename Assets/{SpellingBee/Prefabs/Theme.prefab => Common/Prefabs/Theme Item.prefab} (99%) rename Assets/{SpellingBee/Prefabs/Theme.prefab.meta => Common/Prefabs/Theme Item.prefab.meta} (100%) rename Assets/Common/Scenes/{WebcamAuthorization.unity => Boot.unity} (100%) rename Assets/Common/Scenes/{WebcamAuthorization.unity.meta => Boot.unity.meta} (100%) rename Assets/Common/Scenes/{InfoCourse.unity => CourseActivityScreen.unity} (95%) rename Assets/Common/Scenes/{InfoCourse.unity.meta => CourseActivityScreen.unity.meta} (100%) rename Assets/Common/Scenes/{CoursesScreen.unity => CoursesMenuScreen.unity} (97%) rename Assets/Common/Scenes/{CoursesScreen.unity.meta => CoursesMenuScreen.unity.meta} (100%) rename Assets/Common/Scenes/{StartScreen.unity => MainMenuScreen.unity} (97%) rename Assets/Common/Scenes/{StartScreen.unity.meta => MainMenuScreen.unity.meta} (100%) rename Assets/Common/Scenes/{InfoMinigame.unity => MinigameActivityScreen.unity} (95%) rename Assets/Common/Scenes/{InfoMinigame.unity.meta => MinigameActivityScreen.unity.meta} (100%) rename Assets/Common/Scenes/{ThemeSelection.unity => ThemeSelectionScreen.unity} (99%) rename Assets/Common/Scenes/{ThemeSelection.unity.meta => ThemeSelectionScreen.unity.meta} (100%) create mode 100644 Assets/Common/Scripts/BackButton.cs rename Assets/Common/Scripts/{ChangeSceneOnClick.cs.meta => BackButton.cs.meta} (83%) rename Assets/Common/Scripts/{WebcamAuthorization.cs => BootScreen.cs} (86%) rename Assets/Common/Scripts/{WebcamAuthorization.cs.meta => BootScreen.cs.meta} (100%) delete mode 100644 Assets/Common/Scripts/ChangeSceneOnClick.cs rename Assets/Common/Scripts/{InfoCourse.cs => CourseActivityScreen.cs} (70%) rename Assets/Common/Scripts/{InfoCourse.cs.meta => CourseActivityScreen.cs.meta} (100%) rename Assets/Common/Scripts/{CourseListManager.cs => ListCoursesScreen.cs} (79%) rename Assets/Common/Scripts/{CourseListManager.cs.meta => ListCoursesScreen.cs.meta} (100%) rename Assets/Common/Scripts/{MinigameListManager.cs => ListMinigamesScreen.cs} (90%) rename Assets/Common/Scripts/{MinigameListManager.cs.meta => ListMinigamesScreen.cs.meta} (100%) create mode 100644 Assets/Common/Scripts/MainMenuScreen.cs rename Assets/Common/Scripts/{StartScreenManager.cs.meta => MainMenuScreen.cs.meta} (100%) rename Assets/Common/Scripts/{InfoMinigame.cs => MinigameActivityScreen.cs} (72%) rename Assets/Common/Scripts/{InfoMinigame.cs.meta => MinigameActivityScreen.cs.meta} (100%) delete mode 100644 Assets/Common/Scripts/StartScreenManager.cs create mode 100644 Assets/Common/Scripts/SystemController.cs rename Assets/Common/Scripts/{ThemeSelectionController.cs.meta => SystemController.cs.meta} (83%) rename Assets/Common/Scripts/{ThemeSelectionController.cs => ThemeSelectionScreen.cs} (75%) rename Assets/{Courses/Scripts/StartPause.cs.meta => Common/Scripts/ThemeSelectionScreen.cs.meta} (83%) rename Assets/Courses/Scenes/{Course_0.unity => TemplateCourse.unity} (89%) rename Assets/Courses/Scenes/{Course_0.unity.meta => TemplateCourse.unity.meta} (100%) rename Assets/Courses/Scripts/{StartPause.cs => TemplateCourse.cs} (64%) rename Assets/Courses/Scripts/{Webcam.cs.meta => TemplateCourse.cs.meta} (83%) delete mode 100644 Assets/Courses/Scripts/Webcam.cs delete mode 100644 Assets/users.json delete mode 100644 Assets/users.json.meta rename Assets/Common/Scripts/CourseScreenManager.cs => assets/common/scripts/CourseMenuScreen.cs (94%) rename Assets/Common/Scripts/CourseScreenManager.cs.meta => assets/common/scripts/CourseMenuScreen.cs.meta (100%) diff --git a/Assets/Accounts/Scenes/ChangeUserScreen.unity b/Assets/Accounts/Scenes/ChangeUserScreen.unity index 357c8b1..3b3870d 100644 --- a/Assets/Accounts/Scenes/ChangeUserScreen.unity +++ b/Assets/Accounts/Scenes/ChangeUserScreen.unity @@ -1097,7 +1097,6 @@ GameObject: - component: {fileID: 1143249627} - component: {fileID: 1143249626} - component: {fileID: 1143249625} - - component: {fileID: 1143249628} m_Layer: 5 m_Name: Button (1) m_TagString: Untagged @@ -1170,10 +1169,10 @@ MonoBehaviour: m_OnClick: m_PersistentCalls: m_Calls: - - m_Target: {fileID: 1143249628} - m_TargetAssemblyTypeName: ChangeSceneOnClick, Assembly-CSharp - m_MethodName: LoadScene - m_Mode: 5 + - m_Target: {fileID: 906197780} + m_TargetAssemblyTypeName: ChangeUserScreen, Assembly-CSharp + m_MethodName: GotoUserCreation + m_Mode: 1 m_Arguments: m_ObjectArgument: {fileID: 0} m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine @@ -1220,18 +1219,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1143249623} m_CullTransparentMesh: 1 ---- !u!114 &1143249628 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1143249623} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 949ba4da8595d52aebc98e6f9b6a405e, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!1 &1229328479 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Accounts/Scripts/ChangeUserScreen.cs b/Assets/Accounts/Scripts/ChangeUserScreen.cs index a5f7eef..a88ee57 100644 --- a/Assets/Accounts/Scripts/ChangeUserScreen.cs +++ b/Assets/Accounts/Scripts/ChangeUserScreen.cs @@ -1,9 +1,11 @@ using System.Collections.Generic; using TMPro; using UnityEngine; -using UnityEngine.SceneManagement; using UnityEngine.UI; +/// +/// ChangeUserScreen scene manager +/// public class ChangeUserScreen : MonoBehaviour { /// @@ -58,12 +60,7 @@ public class ChangeUserScreen : MonoBehaviour // Set background color background.color = i == currentUserIndex ? Color.blue : Color.gray; // Find correct component for setting the sprite - foreach (Image img in background.GetComponentsInChildren()) - if (img != background) - { - img.sprite = user.avatar; - break; - } + instance.transform.Find("Avatar").GetComponent().sprite = user.avatar; } } @@ -85,6 +82,14 @@ public class ChangeUserScreen : MonoBehaviour { userList.ChangeCurrentUser(currentUserIndex); userList.Save(); - SceneManager.LoadScene("Common/Scenes/StartScreen"); + SystemController.GetInstance().BackToPreviousScene(); + } + + /// + /// Callback to load the UserCreationScreen scene + /// + public void GotoUserCreation() + { + SystemController.GetInstance().LoadNextScene("Accounts/Scenes/UserCreationScreen"); } } diff --git a/Assets/Accounts/Scripts/Progress.cs b/Assets/Accounts/Scripts/Progress.cs index b54ef7f..2334731 100644 --- a/Assets/Accounts/Scripts/Progress.cs +++ b/Assets/Accounts/Scripts/Progress.cs @@ -73,7 +73,6 @@ public class Progress } } - // Get the value of type `T` belonging to `key` /// /// Get the data object of a certain key /// diff --git a/Assets/Accounts/Scripts/UserCreationScreen.cs b/Assets/Accounts/Scripts/UserCreationScreen.cs index 0a703c2..6b5cb77 100644 --- a/Assets/Accounts/Scripts/UserCreationScreen.cs +++ b/Assets/Accounts/Scripts/UserCreationScreen.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Text.RegularExpressions; using TMPro; using UnityEngine; -using UnityEngine.SceneManagement; using UnityEngine.UI; /// @@ -80,12 +79,7 @@ public class UserCreationScreen : MonoBehaviour // Set background color background.color = selectedAvatar == i ? Color.blue : Color.gray; // Find correct component for setting the sprite - foreach (Image img in background.GetComponentsInChildren()) - if (img != background) - { - img.sprite = sprites[i]; - break; - } + instance.transform.Find("Image").GetComponent().sprite = sprites[i]; } } @@ -123,8 +117,7 @@ public class UserCreationScreen : MonoBehaviour { // Create a new entry in the UserList ScriptableObject users.ChangeCurrentUser(users.CreateAndAddNewUser(username, sprites[selectedAvatar])); - // TODO: change scene, for now just change to StartScreen - SceneManager.LoadScene("Common/Scenes/StartScreen"); + SystemController.GetInstance().BackToPreviousScene(); } // Warn user that username already exists else diff --git a/Assets/Common/Prefabs/ButtonBack.prefab b/Assets/Common/Prefabs/ButtonBack.prefab index 6c61148..c63cee4 100644 --- a/Assets/Common/Prefabs/ButtonBack.prefab +++ b/Assets/Common/Prefabs/ButtonBack.prefab @@ -148,7 +148,7 @@ GameObject: - component: {fileID: 8299246693487308515} - component: {fileID: 8299246693487308518} - component: {fileID: 8299246693487308512} - - component: {fileID: 4155745828263815687} + - component: {fileID: 4518652150503380115} m_Layer: 5 m_Name: ButtonBack m_TagString: Untagged @@ -229,10 +229,10 @@ MonoBehaviour: m_OnClick: m_PersistentCalls: m_Calls: - - m_Target: {fileID: 4155745828263815687} - m_TargetAssemblyTypeName: ChangeSceneOnClick, Assembly-CSharp - m_MethodName: LoadScene - m_Mode: 5 + - m_Target: {fileID: 4518652150503380115} + m_TargetAssemblyTypeName: BackButton, Assembly-CSharp + m_MethodName: Back + m_Mode: 1 m_Arguments: m_ObjectArgument: {fileID: 0} m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine @@ -241,7 +241,7 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 0 m_CallState: 2 ---- !u!114 &4155745828263815687 +--- !u!114 &4518652150503380115 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -250,6 +250,6 @@ MonoBehaviour: m_GameObject: {fileID: 8299246693487308514} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 949ba4da8595d52aebc98e6f9b6a405e, type: 3} + m_Script: {fileID: 11500000, guid: c3dd279b546423e4a8a1b28819a6c4a1, type: 3} m_Name: m_EditorClassIdentifier: diff --git a/Assets/Common/Prefabs/ButtonUser.prefab b/Assets/Common/Prefabs/ButtonUser.prefab index 418cd65..0b5fc9a 100644 --- a/Assets/Common/Prefabs/ButtonUser.prefab +++ b/Assets/Common/Prefabs/ButtonUser.prefab @@ -280,7 +280,6 @@ GameObject: - component: {fileID: 2823887524698191630} - component: {fileID: 2823887524698191625} - component: {fileID: 2823887524698191631} - - component: {fileID: 7528776122952476157} - component: {fileID: 9192617418029337932} m_Layer: 5 m_Name: ButtonUser @@ -376,18 +375,6 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 0 m_CallState: 2 ---- !u!114 &7528776122952476157 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2823887524698191629} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 949ba4da8595d52aebc98e6f9b6a405e, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!114 &9192617418029337932 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/SpellingBee/Prefabs/Theme.prefab b/Assets/Common/Prefabs/Theme Item.prefab similarity index 99% rename from Assets/SpellingBee/Prefabs/Theme.prefab rename to Assets/Common/Prefabs/Theme Item.prefab index 707ffdd..1069252 100644 --- a/Assets/SpellingBee/Prefabs/Theme.prefab +++ b/Assets/Common/Prefabs/Theme Item.prefab @@ -285,7 +285,7 @@ GameObject: - component: {fileID: 1441088452393136283} - component: {fileID: 2691816296520610901} m_Layer: 5 - m_Name: Theme + m_Name: Theme Item m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/Assets/SpellingBee/Prefabs/Theme.prefab.meta b/Assets/Common/Prefabs/Theme Item.prefab.meta similarity index 100% rename from Assets/SpellingBee/Prefabs/Theme.prefab.meta rename to Assets/Common/Prefabs/Theme Item.prefab.meta diff --git a/Assets/Common/Scenes/WebcamAuthorization.unity b/Assets/Common/Scenes/Boot.unity similarity index 100% rename from Assets/Common/Scenes/WebcamAuthorization.unity rename to Assets/Common/Scenes/Boot.unity diff --git a/Assets/Common/Scenes/WebcamAuthorization.unity.meta b/Assets/Common/Scenes/Boot.unity.meta similarity index 100% rename from Assets/Common/Scenes/WebcamAuthorization.unity.meta rename to Assets/Common/Scenes/Boot.unity.meta diff --git a/Assets/Common/Scenes/InfoCourse.unity b/Assets/Common/Scenes/CourseActivityScreen.unity similarity index 95% rename from Assets/Common/Scenes/InfoCourse.unity rename to Assets/Common/Scenes/CourseActivityScreen.unity index 146713a..dec515e 100644 --- a/Assets/Common/Scenes/InfoCourse.unity +++ b/Assets/Common/Scenes/CourseActivityScreen.unity @@ -189,7 +189,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 2 + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &339096154 GameObject: @@ -610,6 +610,7 @@ GameObject: - component: {fileID: 906197777} - component: {fileID: 906197779} - component: {fileID: 906197778} + - component: {fileID: 906197780} m_Layer: 5 m_Name: Panel m_TagString: Untagged @@ -636,6 +637,8 @@ RectTransform: - {fileID: 955994878} - {fileID: 507029407} - {fileID: 1135894725} + - {fileID: 1774458253} + - {fileID: 1804488336} m_Father: {fileID: 1768150806} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -682,6 +685,24 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 906197776} m_CullTransparentMesh: 1 +--- !u!114 &906197780 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 906197776} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4ee87f3cdcccf934b82f9531c90f3457, type: 3} + m_Name: + m_EditorClassIdentifier: + courseList: {fileID: 11400000, guid: a7ab583094b7897468bbca9243717608, type: 2} + userList: {fileID: 11400000, guid: 072bec636a40f7e4e93b0ac624a3bda2, type: 2} + title: {fileID: 1168097236} + description: {fileID: 1990031300} + courseImage: {fileID: 755030131} + progressBar: {fileID: 1135894726} --- !u!1 &955994877 GameObject: m_ObjectHideFlags: 0 @@ -767,10 +788,10 @@ MonoBehaviour: m_OnClick: m_PersistentCalls: m_Calls: - - m_Target: {fileID: 1122939481} - m_TargetAssemblyTypeName: ChangeSceneOnClick, Assembly-CSharp - m_MethodName: LoadScene - m_Mode: 5 + - m_Target: {fileID: 906197780} + m_TargetAssemblyTypeName: CourseActivityScreen, Assembly-CSharp + m_MethodName: StartCourse + m_Mode: 1 m_Arguments: m_ObjectArgument: {fileID: 0} m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine @@ -893,50 +914,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 991775367} m_CullTransparentMesh: 1 ---- !u!1 &1122939480 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1122939482} - - component: {fileID: 1122939481} - m_Layer: 0 - m_Name: SceneControl - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1122939481 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1122939480} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 949ba4da8595d52aebc98e6f9b6a405e, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!4 &1122939482 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1122939480} - 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: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1135894724 GameObject: m_ObjectHideFlags: 0 @@ -1162,56 +1139,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1168097234} m_CullTransparentMesh: 1 ---- !u!1 &1353360909 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1353360911} - - component: {fileID: 1353360910} - m_Layer: 0 - m_Name: InfoControl - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1353360910 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1353360909} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4ee87f3cdcccf934b82f9531c90f3457, type: 3} - m_Name: - m_EditorClassIdentifier: - list: {fileID: 11400000, guid: a7ab583094b7897468bbca9243717608, type: 2} - userList: {fileID: 11400000, guid: 072bec636a40f7e4e93b0ac624a3bda2, type: 2} - title: {fileID: 1168097236} - description: {fileID: 1990031300} - courseImage: {fileID: 755030131} - slider: {fileID: 1135894726} ---- !u!4 &1353360911 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1353360909} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 1023.27716, y: 547.95337, z: -1.0753342} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1768150802 GameObject: m_ObjectHideFlags: 0 @@ -1305,10 +1232,8 @@ RectTransform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 906197777} - - {fileID: 1804488336} - - {fileID: 1774458253} m_Father: {fileID: 0} - m_RootOrder: 3 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -1320,7 +1245,7 @@ PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: - m_TransformParent: {fileID: 1768150806} + m_TransformParent: {fileID: 906197777} m_Modifications: - target: {fileID: 8299246693487308512, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_StringArgument @@ -1340,7 +1265,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} propertyPath: m_RootOrder - value: 2 + value: 7 objectReference: {fileID: 0} - target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} propertyPath: m_AnchorMax.x @@ -1426,8 +1351,12 @@ PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: - m_TransformParent: {fileID: 1768150806} + m_TransformParent: {fileID: 906197777} m_Modifications: + - target: {fileID: 1935285004959629519, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 2823887524698191629, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3} propertyPath: m_Name value: ButtonUser @@ -1442,7 +1371,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 2823887524698191630, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3} propertyPath: m_RootOrder - value: 1 + value: 8 objectReference: {fileID: 0} - target: {fileID: 2823887524698191630, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3} propertyPath: m_AnchorMax.x @@ -1516,6 +1445,26 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3} --- !u!224 &1804488336 stripped @@ -1535,7 +1484,7 @@ GameObject: - component: {fileID: 1903244526} - component: {fileID: 1903244525} m_Layer: 5 - m_Name: ControlsInfo + m_Name: Controls m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/Assets/Common/Scenes/InfoCourse.unity.meta b/Assets/Common/Scenes/CourseActivityScreen.unity.meta similarity index 100% rename from Assets/Common/Scenes/InfoCourse.unity.meta rename to Assets/Common/Scenes/CourseActivityScreen.unity.meta diff --git a/Assets/Common/Scenes/CoursesScreen.unity b/Assets/Common/Scenes/CoursesMenuScreen.unity similarity index 97% rename from Assets/Common/Scenes/CoursesScreen.unity rename to Assets/Common/Scenes/CoursesMenuScreen.unity index 4dec6f7..d149b02 100644 --- a/Assets/Common/Scenes/CoursesScreen.unity +++ b/Assets/Common/Scenes/CoursesMenuScreen.unity @@ -1204,6 +1204,10 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 906197777} m_Modifications: + - target: {fileID: 1935285004959629519, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 2823887524698191629, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3} propertyPath: m_Name value: ButtonUser @@ -1296,6 +1300,26 @@ PrefabInstance: propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_StringArgument value: Common/Scenes/StartScreen objectReference: {fileID: 0} + - target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3} --- !u!224 &1782112234 stripped diff --git a/Assets/Common/Scenes/CoursesScreen.unity.meta b/Assets/Common/Scenes/CoursesMenuScreen.unity.meta similarity index 100% rename from Assets/Common/Scenes/CoursesScreen.unity.meta rename to Assets/Common/Scenes/CoursesMenuScreen.unity.meta diff --git a/Assets/Common/Scenes/StartScreen.unity b/Assets/Common/Scenes/MainMenuScreen.unity similarity index 97% rename from Assets/Common/Scenes/StartScreen.unity rename to Assets/Common/Scenes/MainMenuScreen.unity index e84cd22..cad3aeb 100644 --- a/Assets/Common/Scenes/StartScreen.unity +++ b/Assets/Common/Scenes/MainMenuScreen.unity @@ -343,10 +343,10 @@ MonoBehaviour: m_OnClick: m_PersistentCalls: m_Calls: - - m_Target: {fileID: 1122939481} - m_TargetAssemblyTypeName: ChangeSceneOnClick, Assembly-CSharp - m_MethodName: LoadScene - m_Mode: 5 + - m_Target: {fileID: 906197780} + m_TargetAssemblyTypeName: MainMenuScreen, Assembly-CSharp + m_MethodName: GotoMinigames + m_Mode: 1 m_Arguments: m_ObjectArgument: {fileID: 0} m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine @@ -459,7 +459,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 2 + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &519420028 GameObject: @@ -1166,10 +1166,10 @@ MonoBehaviour: m_OnClick: m_PersistentCalls: m_Calls: - - m_Target: {fileID: 1122939481} - m_TargetAssemblyTypeName: ChangeSceneOnClick, Assembly-CSharp - m_MethodName: LoadScene - m_Mode: 5 + - m_Target: {fileID: 906197780} + m_TargetAssemblyTypeName: MainMenuScreen, Assembly-CSharp + m_MethodName: GotoSettings + m_Mode: 1 m_Arguments: m_ObjectArgument: {fileID: 0} m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine @@ -1292,50 +1292,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 991775367} m_CullTransparentMesh: 1 ---- !u!1 &1122939480 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1122939482} - - component: {fileID: 1122939481} - m_Layer: 0 - m_Name: SceneControl - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1122939481 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1122939480} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 949ba4da8595d52aebc98e6f9b6a405e, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!4 &1122939482 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1122939480} - 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: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1369063653 GameObject: m_ObjectHideFlags: 0 @@ -1497,7 +1453,7 @@ MonoBehaviour: m_PersistentCalls: m_Calls: - m_Target: {fileID: 906197780} - m_TargetAssemblyTypeName: StartScreenManager, Assembly-CSharp + m_TargetAssemblyTypeName: MainMenuScreen, Assembly-CSharp m_MethodName: QuitApplication m_Mode: 1 m_Arguments: @@ -1631,10 +1587,10 @@ MonoBehaviour: m_OnClick: m_PersistentCalls: m_Calls: - - m_Target: {fileID: 1122939481} - m_TargetAssemblyTypeName: ChangeSceneOnClick, Assembly-CSharp - m_MethodName: LoadScene - m_Mode: 5 + - m_Target: {fileID: 906197780} + m_TargetAssemblyTypeName: MainMenuScreen, Assembly-CSharp + m_MethodName: GotoCourses + m_Mode: 1 m_Arguments: m_ObjectArgument: {fileID: 0} m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine @@ -1851,7 +1807,7 @@ RectTransform: m_Children: - {fileID: 906197777} m_Father: {fileID: 0} - m_RootOrder: 3 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} diff --git a/Assets/Common/Scenes/StartScreen.unity.meta b/Assets/Common/Scenes/MainMenuScreen.unity.meta similarity index 100% rename from Assets/Common/Scenes/StartScreen.unity.meta rename to Assets/Common/Scenes/MainMenuScreen.unity.meta diff --git a/Assets/Common/Scenes/InfoMinigame.unity b/Assets/Common/Scenes/MinigameActivityScreen.unity similarity index 95% rename from Assets/Common/Scenes/InfoMinigame.unity rename to Assets/Common/Scenes/MinigameActivityScreen.unity index cf8c3c7..5350c7c 100644 --- a/Assets/Common/Scenes/InfoMinigame.unity +++ b/Assets/Common/Scenes/MinigameActivityScreen.unity @@ -189,7 +189,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 2 + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &143992426 PrefabInstance: @@ -198,6 +198,10 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 906197777} m_Modifications: + - target: {fileID: 1935285004959629519, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 2823887524698191629, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3} propertyPath: m_Name value: ButtonUser @@ -290,6 +294,26 @@ PrefabInstance: propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_StringArgument value: Common/Scenes/StartScreen objectReference: {fileID: 0} + - target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3} --- !u!224 &143992427 stripped @@ -297,59 +321,6 @@ RectTransform: m_CorrespondingSourceObject: {fileID: 2823887524698191630, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3} m_PrefabInstance: {fileID: 143992426} m_PrefabAsset: {fileID: 0} ---- !u!1 &351832751 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 351832753} - - component: {fileID: 351832752} - m_Layer: 0 - m_Name: InfoControl - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &351832752 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 351832751} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 90de9a5c57c2189429073f8aadc9e9b7, type: 3} - m_Name: - m_EditorClassIdentifier: - list: {fileID: 11400000, guid: 51453f9b41bc72f468ba3e67ab622f8f, type: 2} - title: {fileID: 1168097236} - description: {fileID: 1990031300} - gameImage: {fileID: 755030131} - button: {fileID: 955994879} - controls: {fileID: 915818721} - userList: {fileID: 11400000, guid: 072bec636a40f7e4e93b0ac624a3bda2, type: 2} - userContainer: {fileID: 507029407} - prefab: {fileID: 381012861935775045, guid: 154c17a838d2896499bd76d28a584222, type: 3} ---- !u!4 &351832753 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 351832751} - 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: 0} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &507029406 GameObject: m_ObjectHideFlags: 0 @@ -363,7 +334,7 @@ GameObject: - component: {fileID: 507029408} - component: {fileID: 507029410} m_Layer: 5 - m_Name: HighScoresTitle + m_Name: Highscores m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -681,6 +652,7 @@ GameObject: - component: {fileID: 906197777} - component: {fileID: 906197779} - component: {fileID: 906197778} + - component: {fileID: 906197780} m_Layer: 5 m_Name: Panel m_TagString: Untagged @@ -754,6 +726,27 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 906197776} m_CullTransparentMesh: 1 +--- !u!114 &906197780 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 906197776} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 90de9a5c57c2189429073f8aadc9e9b7, type: 3} + m_Name: + m_EditorClassIdentifier: + minigameList: {fileID: 11400000, guid: 51453f9b41bc72f468ba3e67ab622f8f, type: 2} + title: {fileID: 1168097236} + description: {fileID: 1990031300} + gameImage: {fileID: 755030131} + button: {fileID: 955994879} + controls: {fileID: 915818721} + userList: {fileID: 11400000, guid: 072bec636a40f7e4e93b0ac624a3bda2, type: 2} + userContainer: {fileID: 507029407} + prefab: {fileID: 381012861935775045, guid: 154c17a838d2896499bd76d28a584222, type: 3} --- !u!1 &915818719 GameObject: m_ObjectHideFlags: 0 @@ -766,7 +759,7 @@ GameObject: - component: {fileID: 915818722} - component: {fileID: 915818721} m_Layer: 5 - m_Name: ControlsInfo + m_Name: Controls m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -902,7 +895,7 @@ GameObject: - component: {fileID: 955994880} - component: {fileID: 955994879} m_Layer: 5 - m_Name: PlayButton + m_Name: Play Button m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -1088,50 +1081,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 991775367} m_CullTransparentMesh: 1 ---- !u!1 &1122939480 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1122939482} - - component: {fileID: 1122939481} - m_Layer: 0 - m_Name: SceneControl - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1122939481 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1122939480} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 949ba4da8595d52aebc98e6f9b6a405e, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!4 &1122939482 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1122939480} - 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: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1168097234 GameObject: m_ObjectHideFlags: 0 @@ -1467,7 +1416,7 @@ RectTransform: m_Children: - {fileID: 906197777} m_Father: {fileID: 0} - m_RootOrder: 3 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} diff --git a/Assets/Common/Scenes/InfoMinigame.unity.meta b/Assets/Common/Scenes/MinigameActivityScreen.unity.meta similarity index 100% rename from Assets/Common/Scenes/InfoMinigame.unity.meta rename to Assets/Common/Scenes/MinigameActivityScreen.unity.meta diff --git a/Assets/Common/Scenes/ThemeSelection.unity b/Assets/Common/Scenes/ThemeSelectionScreen.unity similarity index 99% rename from Assets/Common/Scenes/ThemeSelection.unity rename to Assets/Common/Scenes/ThemeSelectionScreen.unity index 555df50..df4025a 100644 --- a/Assets/Common/Scenes/ThemeSelection.unity +++ b/Assets/Common/Scenes/ThemeSelectionScreen.unity @@ -706,7 +706,7 @@ MonoBehaviour: m_GameObject: {fileID: 1768150802} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 68caaa5508a4d40448b47630ff86f035, type: 3} + m_Script: {fileID: 11500000, guid: 30d9f9130bf1d414aaad006b2177bdea, type: 3} m_Name: m_EditorClassIdentifier: themePrefab: {fileID: 1441088452393136277, guid: 67febbbd89041e243b4e201a9f8d91e9, type: 3} diff --git a/Assets/Common/Scenes/ThemeSelection.unity.meta b/Assets/Common/Scenes/ThemeSelectionScreen.unity.meta similarity index 100% rename from Assets/Common/Scenes/ThemeSelection.unity.meta rename to Assets/Common/Scenes/ThemeSelectionScreen.unity.meta diff --git a/Assets/Common/Scripts/BackButton.cs b/Assets/Common/Scripts/BackButton.cs new file mode 100644 index 0000000..764fc06 --- /dev/null +++ b/Assets/Common/Scripts/BackButton.cs @@ -0,0 +1,15 @@ +using UnityEngine; + +/// +/// Script managing the default 'back'-button action +/// +public class BackButton : MonoBehaviour +{ + /// + /// The default 'back'-button action: go back to the previous scene + /// + public void Back() + { + SystemController.GetInstance().BackToPreviousScene(); + } +} diff --git a/Assets/Common/Scripts/ChangeSceneOnClick.cs.meta b/Assets/Common/Scripts/BackButton.cs.meta similarity index 83% rename from Assets/Common/Scripts/ChangeSceneOnClick.cs.meta rename to Assets/Common/Scripts/BackButton.cs.meta index d139720..0e3e13b 100644 --- a/Assets/Common/Scripts/ChangeSceneOnClick.cs.meta +++ b/Assets/Common/Scripts/BackButton.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 949ba4da8595d52aebc98e6f9b6a405e +guid: c3dd279b546423e4a8a1b28819a6c4a1 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Common/Scripts/WebcamAuthorization.cs b/Assets/Common/Scripts/BootScreen.cs similarity index 86% rename from Assets/Common/Scripts/WebcamAuthorization.cs rename to Assets/Common/Scripts/BootScreen.cs index 8190409..ef66015 100644 --- a/Assets/Common/Scripts/WebcamAuthorization.cs +++ b/Assets/Common/Scripts/BootScreen.cs @@ -1,12 +1,11 @@ using System.Collections; using TMPro; using UnityEngine; -using UnityEngine.SceneManagement; /// /// Authorize and check for available webcam(s) /// -public class WebcamAuthorization : MonoBehaviour +public class BootScreen : MonoBehaviour { /// /// UI Reference to the text object to display an error message @@ -24,7 +23,7 @@ public class WebcamAuthorization : MonoBehaviour { if (0 < WebCamTexture.devices.Length) { - SceneManager.LoadScene("Common/Scenes/StartScreen"); + SystemController.GetInstance().SwapScene("Common/Scenes/MainMenuScreen"); } else { diff --git a/Assets/Common/Scripts/WebcamAuthorization.cs.meta b/Assets/Common/Scripts/BootScreen.cs.meta similarity index 100% rename from Assets/Common/Scripts/WebcamAuthorization.cs.meta rename to Assets/Common/Scripts/BootScreen.cs.meta diff --git a/Assets/Common/Scripts/ChangeSceneOnClick.cs b/Assets/Common/Scripts/ChangeSceneOnClick.cs deleted file mode 100644 index 7e7b0d9..0000000 --- a/Assets/Common/Scripts/ChangeSceneOnClick.cs +++ /dev/null @@ -1,35 +0,0 @@ -using UnityEngine; -using UnityEngine.SceneManagement; - -/// -/// Class to handle scene loading callbacks -/// -public class ChangeSceneOnClick : MonoBehaviour -{ - /// - /// Method used as callback for gameobject onClick events - /// - /// The path to the new scene (path == $"Assets/{sceneName}") - public void LoadScene(string sceneName) - { - SceneManager.LoadScene(sceneName); - } - - /// - /// Method used as callback for gameobject onClick events - /// - /// Reference to a scene - public void LoadScene(Scene scene) - { - SceneManager.LoadScene(scene.buildIndex); - } - - /// - /// Method used as callback from gameobject onClick events - /// - /// Build index of the scene to be loaded - public void LoadScene(int buildIndex) - { - SceneManager.LoadScene(buildIndex); - } -} diff --git a/Assets/Common/Scripts/InfoCourse.cs b/Assets/Common/Scripts/CourseActivityScreen.cs similarity index 70% rename from Assets/Common/Scripts/InfoCourse.cs rename to Assets/Common/Scripts/CourseActivityScreen.cs index e1918d9..d64569b 100644 --- a/Assets/Common/Scripts/InfoCourse.cs +++ b/Assets/Common/Scripts/CourseActivityScreen.cs @@ -1,18 +1,16 @@ -using System.Collections; -using System.Collections.Generic; +using TMPro; using UnityEngine; using UnityEngine.UI; -using TMPro; // For text /// /// Manager infopage for the Courses /// -public class InfoCourse : MonoBehaviour +public class CourseActivityScreen : MonoBehaviour { /// /// Reference to the courses /// - public CourseList list; + public CourseList courseList; // private float maxvalue; In case we want to change progress e.g. amount of words correct, then change maxvalue amount of words etc. /// @@ -43,17 +41,15 @@ public class InfoCourse : MonoBehaviour /// /// Progress bar Display /// - public Slider slider; - - - // Start is called before the first frame update + public Slider progressBar; + /// /// Sets the infopage for a given course /// void Start() { - int index = list.currentCourseIndex; - Course course = list.courses[index]; + int index = courseList.currentCourseIndex; + Course course = courseList.courses[index]; title.text = course.title; description.text = course.description; @@ -63,9 +59,16 @@ public class InfoCourse : MonoBehaviour // Set progress progress = userList.GetCurrentUser().GetCourseProgress(course.index); if (progress != null) - slider.value = progress.Get("courseProgress"); + progressBar.value = progress.Get("courseProgress"); else - slider.value = 0.0f; + progressBar.value = 0.0f; } + /// + /// Callback to start the course + /// + public void StartCourse() + { + SystemController.GetInstance().LoadNextScene("Courses/Scenes/TemplateCourse"); + } } diff --git a/Assets/Common/Scripts/InfoCourse.cs.meta b/Assets/Common/Scripts/CourseActivityScreen.cs.meta similarity index 100% rename from Assets/Common/Scripts/InfoCourse.cs.meta rename to Assets/Common/Scripts/CourseActivityScreen.cs.meta diff --git a/Assets/Common/Scripts/CourseItem.cs b/Assets/Common/Scripts/CourseItem.cs index be5f01c..98fe52c 100644 --- a/Assets/Common/Scripts/CourseItem.cs +++ b/Assets/Common/Scripts/CourseItem.cs @@ -1,6 +1,5 @@ using TMPro; using UnityEngine; -using UnityEngine.SceneManagement; using UnityEngine.UI; /// @@ -68,6 +67,6 @@ public class CourseItem : MonoBehaviour slider.GetComponent().value = progress; // Add click functionality - button.onClick.AddListener(() => SceneManager.LoadScene("Common/Scenes/InfoCourse")); + button.onClick.AddListener(() => SystemController.GetInstance().LoadNextScene("Common/Scenes/CourseActivityScreen")); } } diff --git a/Assets/Common/Scripts/CourseListManager.cs b/Assets/Common/Scripts/ListCoursesScreen.cs similarity index 79% rename from Assets/Common/Scripts/CourseListManager.cs rename to Assets/Common/Scripts/ListCoursesScreen.cs index 40548a1..ebf78bf 100644 --- a/Assets/Common/Scripts/CourseListManager.cs +++ b/Assets/Common/Scripts/ListCoursesScreen.cs @@ -1,10 +1,9 @@ using UnityEngine; -using UnityEngine.SceneManagement; /// /// ListCourseScreen scene manager /// -public class CourseListManager : MonoBehaviour +public class ListCoursesScreen : MonoBehaviour { /// /// Reference to the course-list container object @@ -40,9 +39,8 @@ public class CourseListManager : MonoBehaviour /// /// Method used as callback for course item onClick events /// - /// The path to the new scene (path == $"Assets/{sceneName}") - public void LoadScene(string sceneName) + public void GotoCourseInfo() { - SceneManager.LoadScene(sceneName); + SystemController.GetInstance().LoadNextScene("Common/Scenes/CourseActivityScreen"); } } diff --git a/Assets/Common/Scripts/CourseListManager.cs.meta b/Assets/Common/Scripts/ListCoursesScreen.cs.meta similarity index 100% rename from Assets/Common/Scripts/CourseListManager.cs.meta rename to Assets/Common/Scripts/ListCoursesScreen.cs.meta diff --git a/Assets/Common/Scripts/MinigameListManager.cs b/Assets/Common/Scripts/ListMinigamesScreen.cs similarity index 90% rename from Assets/Common/Scripts/MinigameListManager.cs rename to Assets/Common/Scripts/ListMinigamesScreen.cs index 44fb9f6..613d674 100644 --- a/Assets/Common/Scripts/MinigameListManager.cs +++ b/Assets/Common/Scripts/ListMinigamesScreen.cs @@ -1,10 +1,9 @@ using UnityEngine; -using UnityEngine.SceneManagement; /// /// ListMinigameScreen scene manager /// -public class MinigameListManager : MonoBehaviour +public class ListMinigamesScreen : MonoBehaviour { /// /// Reference to minigame-list container object @@ -43,6 +42,6 @@ public class MinigameListManager : MonoBehaviour /// The path to the new scene (path == $"Assets/{sceneName}") public void LoadScene(string sceneName) { - SceneManager.LoadScene(sceneName); + SystemController.GetInstance().LoadNextScene(sceneName); } } diff --git a/Assets/Common/Scripts/MinigameListManager.cs.meta b/Assets/Common/Scripts/ListMinigamesScreen.cs.meta similarity index 100% rename from Assets/Common/Scripts/MinigameListManager.cs.meta rename to Assets/Common/Scripts/ListMinigamesScreen.cs.meta diff --git a/Assets/Common/Scripts/MainMenuScreen.cs b/Assets/Common/Scripts/MainMenuScreen.cs new file mode 100644 index 0000000..1a7885a --- /dev/null +++ b/Assets/Common/Scripts/MainMenuScreen.cs @@ -0,0 +1,57 @@ +using System.IO; +using UnityEngine; + +/// +/// StartScreen scene manager +/// +public class MainMenuScreen : MonoBehaviour +{ + /// + /// Referece to the userlist to check whether an user account is present + /// + public UserList userList; + + /// + /// Check on load whether a user is already present, + /// if not load the UserCreationScreen scene so the user can create a new account + /// + void Awake() + { + if (!File.Exists(UserList.PATH) || userList.GetUsers().Count <= 0) + { + SystemController.GetInstance().LoadNextScene("Accounts/Scenes/UserCreationScreen"); + } + } + + /// + /// Quit the application + /// + public void QuitApplication() + { + Application.Quit(); + } + + /// + /// Load the `CoursesMenuScreen` scene + /// + public void GotoCourses() + { + SystemController.GetInstance().LoadNextScene("Common/Scenes/CoursesMenuScreen"); + } + + /// + /// Load the `ListMinigamesScreen` scene + /// + public void GotoMinigames() + { + SystemController.GetInstance().LoadNextScene("Common/Scenes/ListMinigamesScreen"); + } + + /// + /// Load the `SettingsScreen` scene + /// + public void GotoSettings() + { + SystemController.GetInstance().LoadNextScene("Common/Scenes/SettingsScreen"); + } +} diff --git a/Assets/Common/Scripts/StartScreenManager.cs.meta b/Assets/Common/Scripts/MainMenuScreen.cs.meta similarity index 100% rename from Assets/Common/Scripts/StartScreenManager.cs.meta rename to Assets/Common/Scripts/MainMenuScreen.cs.meta diff --git a/Assets/Common/Scripts/Minigame.cs b/Assets/Common/Scripts/Minigame.cs index 0e29a43..c33c3fb 100644 --- a/Assets/Common/Scripts/Minigame.cs +++ b/Assets/Common/Scripts/Minigame.cs @@ -40,5 +40,4 @@ public class Minigame : ScriptableObject /// An explanation on how to play the game and score points /// public string controls; - } diff --git a/Assets/Common/Scripts/InfoMinigame.cs b/Assets/Common/Scripts/MinigameActivityScreen.cs similarity index 72% rename from Assets/Common/Scripts/InfoMinigame.cs rename to Assets/Common/Scripts/MinigameActivityScreen.cs index 494270f..064693e 100644 --- a/Assets/Common/Scripts/InfoMinigame.cs +++ b/Assets/Common/Scripts/MinigameActivityScreen.cs @@ -1,23 +1,19 @@ using System; -using System.Collections; using System.Collections.Generic; using System.Linq; using TMPro; -using UnityEditor; using UnityEngine; -using UnityEngine.SceneManagement; using UnityEngine.UI; -using static GameController; /// /// Manager infopage for the Minigames /// -public class InfoMinigame : MonoBehaviour +public class MinigameActivityScreen : MonoBehaviour { /// /// Reference to the Minigames /// - public MinigameList list; + public MinigameList minigameList; /// /// Title Display @@ -44,8 +40,6 @@ public class InfoMinigame : MonoBehaviour /// public TMP_Text controls; - // Scores for each user - /// /// Reference to the users /// @@ -66,7 +60,6 @@ public class InfoMinigame : MonoBehaviour /// public GameObject prefab; - // Start is called before the first frame update /// /// Sets the infopage for a given minigame /// @@ -82,9 +75,9 @@ public class InfoMinigame : MonoBehaviour private void GenerateContent() { // Get current minigame - int index = list.currentMinigameIndex; - Minigame minigame = list.minigames[index]; - + int index = minigameList.currentMinigameIndex; + Minigame minigame = minigameList.minigames[index]; + // Set main screen title.text = minigame.title; description.text = minigame.description; @@ -92,10 +85,13 @@ public class InfoMinigame : MonoBehaviour controls.text = minigame.controls; // Add click - if (minigame.needsTheme) { - button.onClick.AddListener(() => SceneManager.LoadScene("Common/Scenes/ThemeSelection")); - } else { - button.onClick.AddListener(() => SceneManager.LoadScene(minigame.minigameEntryPoint)); + if (minigame.needsTheme) + { + button.onClick.AddListener(() => SystemController.GetInstance().LoadNextScene("Common/Scenes/ThemeSelectionScreen")); + } + else + { + button.onClick.AddListener(() => SystemController.GetInstance().LoadNextScene(minigame.minigameEntryPoint)); } } @@ -108,10 +104,10 @@ public class InfoMinigame : MonoBehaviour private void GenerateHighScores() { // Get current minigame - int index = list.currentMinigameIndex; - Minigame minigame = list.minigames[index]; + int index = minigameList.currentMinigameIndex; + Minigame minigame = minigameList.minigames[index]; - List> allScores = new List>(); + List> allScores = new List>(); foreach (User user in userList.GetUsers()) { // Get user's progress for this minigame @@ -119,10 +115,10 @@ public class InfoMinigame : MonoBehaviour if (progress != null) { // Add scores to dictionary - List scores = progress.Get>("scores"); - foreach (Score score in scores) + List scores = progress.Get>("scores"); + foreach (GameController.Score score in scores) { - allScores.Add(new Tuple(user.username, user.avatar, score)); + allScores.Add(new Tuple(user.username, user.avatar, score)); } } } @@ -131,17 +127,16 @@ public class InfoMinigame : MonoBehaviour allScores.Sort((a, b) => b.Item3.scoreValue.CompareTo(a.Item3.scoreValue)); // Instantiate scoreboard entries - foreach (Tuple tup in allScores.Take(3)) + foreach (Tuple tup in allScores.Take(3)) { string username = tup.Item1; Sprite sprite = tup.Item2; - Score score = tup.Item3; + GameController.Score score = tup.Item3; GameObject instance = GameObject.Instantiate(prefab, userContainer); instance.transform.Find("Title").GetComponent().text = username; instance.transform.Find("Avatar").GetComponent().sprite = sprite; instance.transform.Find("Score").GetComponent().text = score.scoreValue.ToString(); - } } } diff --git a/Assets/Common/Scripts/InfoMinigame.cs.meta b/Assets/Common/Scripts/MinigameActivityScreen.cs.meta similarity index 100% rename from Assets/Common/Scripts/InfoMinigame.cs.meta rename to Assets/Common/Scripts/MinigameActivityScreen.cs.meta diff --git a/Assets/Common/Scripts/MinigameItem.cs b/Assets/Common/Scripts/MinigameItem.cs index 629a29b..b652236 100644 --- a/Assets/Common/Scripts/MinigameItem.cs +++ b/Assets/Common/Scripts/MinigameItem.cs @@ -1,14 +1,12 @@ using TMPro; using UnityEngine; -using UnityEngine.SceneManagement; using UnityEngine.UI; -using System.Collections.Generic; /// /// Handles the display of minigames in the ListMinigameScreen scene /// public class MinigameItem : MonoBehaviour -{ +{ /// /// Reference to the minigame object /// @@ -46,11 +44,12 @@ public class MinigameItem : MonoBehaviour // Set appearance thumbnail.sprite = minigame.thumbnail; title.text = minigame.title; - + // Add click functionality - button.onClick.AddListener(() => { + button.onClick.AddListener(() => + { PlayerPrefs.SetString("gamePath", minigame.minigameEntryPoint); - SceneManager.LoadScene("Common/Scenes/InfoMinigame"); + SystemController.GetInstance().LoadNextScene("Common/Scenes/MinigameActivityScreen"); }); } } diff --git a/Assets/Common/Scripts/StartScreenManager.cs b/Assets/Common/Scripts/StartScreenManager.cs deleted file mode 100644 index ea93cd9..0000000 --- a/Assets/Common/Scripts/StartScreenManager.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.IO; -using UnityEngine; -using UnityEngine.SceneManagement; - -/// -/// StartScreen scene manager -/// -public class StartScreenManager : MonoBehaviour -{ - /// - /// Referece to the userlist to check whether an user account is present - /// - public UserList userList; - - /// - /// Check on load whether a user is already present, - /// if not load the UserCreationScreen scene so the user can create a new account - /// - void Awake() - { - if (!File.Exists(UserList.PATH) || userList.GetUsers().Count <= 0) - { - SceneManager.LoadScene("Accounts/Scenes/UserCreationScreen"); - } - } - - public void QuitApplication() - { - Application.Quit(); - } -} diff --git a/Assets/Common/Scripts/SystemController.cs b/Assets/Common/Scripts/SystemController.cs new file mode 100644 index 0000000..69774b3 --- /dev/null +++ b/Assets/Common/Scripts/SystemController.cs @@ -0,0 +1,104 @@ +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.SceneManagement; + +/// +/// SystemController singleton +/// +public class SystemController +{ + /// + /// The instance controlling the singleton + /// + private static SystemController instance = null; + + /// + /// Stack of the loaded scenes, used to easily go back to previous scenes + /// + private Stack sceneStack = new Stack(); + + /// + /// Get the instance loaded by the singleton + /// + /// SystemController instance + public static SystemController GetInstance() + { + // Create a new instance if non exists + if (instance == null) + { + instance = new SystemController(); + instance.sceneStack.Push(SceneManager.GetActiveScene().buildIndex); + } + return instance; + } + + /// + /// Load the scene and push on the stack + /// + /// Path of the scene + public void LoadNextScene(string scenePath) + { + LoadNextScene(SceneUtility.GetBuildIndexByScenePath(scenePath)); + } + + /// + /// Load the scene and push on the stack + /// + /// Buildindex of the scene + public void LoadNextScene(int sceneIndex) + { + sceneStack.Push(sceneIndex); + SceneManager.LoadScene(sceneIndex); + } + + /// + /// Swap the current scene with the new scene on the stack + /// + /// Path of the scene + public void SwapScene(string scenePath) + { + SwapScene(SceneUtility.GetBuildIndexByScenePath(scenePath)); + } + + /// + /// Swap the current scene with the new scene on the stack + /// + /// Buildindex of the scene + public void SwapScene(int sceneIndex) + { + sceneStack.Pop(); + LoadNextScene(sceneIndex); + } + + /// + /// Go back to the previous scene and unload the current scene + /// + public void BackToPreviousScene() + { + sceneStack.Pop(); + + if (sceneStack.Count > 0) SceneManager.LoadScene(sceneStack.Peek()); + else Application.Quit(); + } + + /// + /// Go back to a specific scene, unloading all the scenes on the way + /// + /// Path of the scene + public void BackToScene(string scenePath) + { + BackToScene(SceneUtility.GetBuildIndexByScenePath(scenePath)); + } + + /// + /// Go back to a specific scene, unloading all the scene on the way + /// + /// Buildindex of the scene + public void BackToScene(int sceneIndex) + { + while (0 < sceneStack.Count && sceneStack.Peek() != sceneIndex) sceneStack.Pop(); + + if (sceneStack.Count > 0) SceneManager.LoadScene(sceneStack.Peek()); + else Application.Quit(); + } +} diff --git a/Assets/Common/Scripts/ThemeSelectionController.cs.meta b/Assets/Common/Scripts/SystemController.cs.meta similarity index 83% rename from Assets/Common/Scripts/ThemeSelectionController.cs.meta rename to Assets/Common/Scripts/SystemController.cs.meta index 106373a..9b50852 100644 --- a/Assets/Common/Scripts/ThemeSelectionController.cs.meta +++ b/Assets/Common/Scripts/SystemController.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 68caaa5508a4d40448b47630ff86f035 +guid: e901944427bb1104a881881efebd3737 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Common/Scripts/ThemeSelectionController.cs b/Assets/Common/Scripts/ThemeSelectionScreen.cs similarity index 75% rename from Assets/Common/Scripts/ThemeSelectionController.cs rename to Assets/Common/Scripts/ThemeSelectionScreen.cs index 9b15dec..f7c27f1 100644 --- a/Assets/Common/Scripts/ThemeSelectionController.cs +++ b/Assets/Common/Scripts/ThemeSelectionScreen.cs @@ -1,12 +1,10 @@ using UnityEngine; -using UnityEngine.SceneManagement; /// -/// Controller for the theme selection screen +/// ThemeSelectionScreen scene manager /// -public class ThemeSelectionController : MonoBehaviour +public class ThemeSelectionScreen : MonoBehaviour { - [Header("Theme Selection")] /// /// Theme prefab /// @@ -18,9 +16,9 @@ public class ThemeSelectionController : MonoBehaviour public Transform themesContainer; /// - /// Function that is called upon loading the scene + /// Start is called before the first frame update /// - public void Start() + void Start() { // TODO: change to ScriptableObject ThemeList themeList = ThemeLoader.LoadJson(); @@ -41,11 +39,12 @@ public class ThemeSelectionController : MonoBehaviour } /// - /// Function that is called upon a button click + /// Load the game with a specified theme /// + /// Name of the clicked theme public void OnButtonClick(string clickedTheme) { PlayerPrefs.SetString("themeName", clickedTheme); - SceneManager.LoadScene(PlayerPrefs.GetString("gamePath")); + SystemController.GetInstance().SwapScene(PlayerPrefs.GetString("gamePath")); } } diff --git a/Assets/Courses/Scripts/StartPause.cs.meta b/Assets/Common/Scripts/ThemeSelectionScreen.cs.meta similarity index 83% rename from Assets/Courses/Scripts/StartPause.cs.meta rename to Assets/Common/Scripts/ThemeSelectionScreen.cs.meta index 590837a..1b2a48e 100644 --- a/Assets/Courses/Scripts/StartPause.cs.meta +++ b/Assets/Common/Scripts/ThemeSelectionScreen.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ae746f332e314e84c9df74b892c75d4d +guid: 30d9f9130bf1d414aaad006b2177bdea MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Common/Scripts/UserButton.cs b/Assets/Common/Scripts/UserButton.cs index a08f6ad..157764b 100644 --- a/Assets/Common/Scripts/UserButton.cs +++ b/Assets/Common/Scripts/UserButton.cs @@ -1,6 +1,5 @@ using TMPro; using UnityEngine; -using UnityEngine.SceneManagement; using UnityEngine.UI; /// @@ -44,7 +43,7 @@ public class UserButton : MonoBehaviour /// public void OpenProgressCallback() { - SceneManager.LoadScene("Accounts/Scenes/UserProgressScreen"); + SystemController.GetInstance().LoadNextScene("Accounts/Scenes/UserProgressScreen"); } /// @@ -52,7 +51,7 @@ public class UserButton : MonoBehaviour /// public void ChangeUserCallback() { - SceneManager.LoadScene("Accounts/Scenes/ChangeUserScreen"); + SystemController.GetInstance().LoadNextScene("Accounts/Scenes/ChangeUserScreen"); } /// diff --git a/Assets/Courses/Scenes/Course_0.unity b/Assets/Courses/Scenes/TemplateCourse.unity similarity index 89% rename from Assets/Courses/Scenes/Course_0.unity rename to Assets/Courses/Scenes/TemplateCourse.unity index a38148c..2560b35 100644 --- a/Assets/Courses/Scenes/Course_0.unity +++ b/Assets/Courses/Scenes/TemplateCourse.unity @@ -394,61 +394,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 100123244} m_CullTransparentMesh: 1 ---- !u!1 &118887548 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 118887550} - - component: {fileID: 118887549} - m_Layer: 0 - m_Name: Button-controller - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &118887549 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 118887548} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: ae746f332e314e84c9df74b892c75d4d, type: 3} - m_Name: - m_EditorClassIdentifier: - player: {fileID: 993952931} - button: {fileID: 1159630774} - pauseSprite: {fileID: 21300000, guid: 43db869a07cf51f45a411b6e4a417743, type: 3} - wordImage: {fileID: 2145235737} - title: {fileID: 388014849} - userList: {fileID: 11400000, guid: 072bec636a40f7e4e93b0ac624a3bda2, type: 2} - courselist: {fileID: 11400000, guid: a7ab583094b7897468bbca9243717608, type: 2} - ResultPanel: {fileID: 1383144366} - CoursesButton: {fileID: 839294691} - Webcam: {fileID: 1485779445} - timeSpent: {fileID: 77614869} ---- !u!4 &118887550 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 118887548} - 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: 0} - m_RootOrder: 5 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &301088547 GameObject: m_ObjectHideFlags: 0 @@ -460,6 +405,7 @@ GameObject: - component: {fileID: 301088548} - component: {fileID: 301088550} - component: {fileID: 301088549} + - component: {fileID: 301088551} m_Layer: 5 m_Name: Panel m_TagString: Untagged @@ -480,12 +426,12 @@ RectTransform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 2145235736} - - {fileID: 414055543} - {fileID: 1493108463} - {fileID: 378145455} - {fileID: 1343151409} - {fileID: 1813638489} - {fileID: 409590586} + - {fileID: 1335886460} m_Father: {fileID: 1559094126} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -532,6 +478,32 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 301088547} m_CullTransparentMesh: 0 +--- !u!114 &301088551 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 301088547} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6b3f784c065813a4a8364b1299284816, type: 3} + m_Name: + m_EditorClassIdentifier: + webcamDisplay: {fileID: 378145456} + feedback: {fileID: 409590587} + feedbackPopup: {fileID: 1374011069} + dynamic: {fileID: 1523390682} + player: {fileID: 993952931} + button: {fileID: 1159630774} + pauseSprite: {fileID: 21300000, guid: 43db869a07cf51f45a411b6e4a417743, type: 3} + wordImage: {fileID: 2145235737} + title: {fileID: 388014849} + userList: {fileID: 11400000, guid: 072bec636a40f7e4e93b0ac624a3bda2, type: 2} + courselist: {fileID: 11400000, guid: a7ab583094b7897468bbca9243717608, type: 2} + ResultPanel: {fileID: 1383144366} + CoursesButton: {fileID: 839294691} + timeSpent: {fileID: 77614869} --- !u!1 &361280475 GameObject: m_ObjectHideFlags: 0 @@ -749,7 +721,7 @@ GameObject: - component: {fileID: 378145457} - component: {fileID: 378145456} m_Layer: 5 - m_Name: Webcam-bg + m_Name: Webcam Background m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -768,7 +740,7 @@ RectTransform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 301088548} - m_RootOrder: 3 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -822,7 +794,7 @@ GameObject: - component: {fileID: 388014850} - component: {fileID: 388014849} m_Layer: 5 - m_Name: title + m_Name: Title m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -960,7 +932,7 @@ GameObject: - component: {fileID: 409590588} - component: {fileID: 409590587} m_Layer: 5 - m_Name: Test-feedback-button + m_Name: Feedback Button m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -980,7 +952,7 @@ RectTransform: m_Children: - {fileID: 1138468890} m_Father: {fileID: 301088548} - m_RootOrder: 6 + 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} @@ -1031,9 +1003,9 @@ MonoBehaviour: m_OnClick: m_PersistentCalls: m_Calls: - - m_Target: {fileID: 1485779445} - m_TargetAssemblyTypeName: Webcam, Assembly-CSharp - m_MethodName: Show_feedback + - m_Target: {fileID: 301088551} + m_TargetAssemblyTypeName: TemplateCourse, Assembly-CSharp + m_MethodName: ShowFeedback m_Mode: 1 m_Arguments: m_ObjectArgument: {fileID: 0} @@ -1081,140 +1053,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 409590585} m_CullTransparentMesh: 1 ---- !u!1 &414055542 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 414055543} - - component: {fileID: 414055546} - - component: {fileID: 414055545} - - component: {fileID: 414055544} - m_Layer: 5 - m_Name: Courses - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &414055543 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 414055542} - 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: 1785847568} - m_Father: {fileID: 301088548} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 234, y: -60} - m_SizeDelta: {x: 480.0704, y: 99.1845} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &414055544 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 414055542} - 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.9607843, g: 0.9607843, b: 0.9607843, 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} - 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: 414055545} - m_OnClick: - m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 1485779445} - m_TargetAssemblyTypeName: Webcam, Assembly-CSharp - m_MethodName: LoadScene - m_Mode: 5 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: CoursesScreen - m_BoolArgument: 0 - m_CallState: 2 ---- !u!114 &414055545 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 414055542} - 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, g: 0, b: 0, a: 0} - 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: 10917, 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 &414055546 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 414055542} - m_CullTransparentMesh: 1 --- !u!1 &519420028 GameObject: m_ObjectHideFlags: 0 @@ -1518,13 +1356,13 @@ MonoBehaviour: m_OnClick: m_PersistentCalls: m_Calls: - - m_Target: {fileID: 0} - m_TargetAssemblyTypeName: - m_MethodName: + - m_Target: {fileID: 301088551} + m_TargetAssemblyTypeName: TemplateCourse, Assembly-CSharp + m_MethodName: Back m_Mode: 1 m_Arguments: m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine m_IntArgument: 0 m_FloatArgument: 0 m_StringArgument: @@ -2130,7 +1968,7 @@ MonoBehaviour: m_OnClick: m_PersistentCalls: m_Calls: - - m_Target: {fileID: 118887549} + - m_Target: {fileID: 0} m_TargetAssemblyTypeName: StartPause, Assembly-CSharp m_MethodName: Pause m_Mode: 1 @@ -2256,6 +2094,120 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1300721216} m_CullTransparentMesh: 1 +--- !u!1001 &1335886459 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 301088548} + m_Modifications: + - target: {fileID: 8299246693487308512, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 301088551} + - target: {fileID: 8299246693487308512, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: Back + objectReference: {fileID: 0} + - target: {fileID: 8299246693487308512, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName + value: TemplateCourse, Assembly-CSharp + objectReference: {fileID: 0} + - target: {fileID: 8299246693487308514, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} + propertyPath: m_Name + value: ButtonBack + objectReference: {fileID: 0} + - target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} + propertyPath: m_Pivot.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} + propertyPath: m_RootOrder + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} + propertyPath: m_SizeDelta.x + value: 300 + objectReference: {fileID: 0} + - target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} + propertyPath: m_SizeDelta.y + value: 120 + objectReference: {fileID: 0} + - target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} +--- !u!224 &1335886460 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} + m_PrefabInstance: {fileID: 1335886459} + m_PrefabAsset: {fileID: 0} --- !u!1 &1343151408 GameObject: m_ObjectHideFlags: 0 @@ -2269,7 +2221,7 @@ GameObject: - component: {fileID: 1343151411} - component: {fileID: 1343151410} m_Layer: 5 - m_Name: Change-cam + m_Name: Change Webcam Button m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -2289,7 +2241,7 @@ RectTransform: m_Children: - {fileID: 1898926705} m_Father: {fileID: 301088548} - m_RootOrder: 4 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -2340,8 +2292,8 @@ MonoBehaviour: m_OnClick: m_PersistentCalls: m_Calls: - - m_Target: {fileID: 1485779445} - m_TargetAssemblyTypeName: Webcam, Assembly-CSharp + - m_Target: {fileID: 301088551} + m_TargetAssemblyTypeName: TemplateCourse, Assembly-CSharp m_MethodName: SwapCam m_Mode: 1 m_Arguments: @@ -2402,7 +2354,7 @@ GameObject: - component: {fileID: 1374011072} - component: {fileID: 1374011071} m_Layer: 5 - m_Name: Panel + m_Name: Feedback m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -2701,54 +2653,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1427866734} m_CullTransparentMesh: 1 ---- !u!1 &1485779444 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1485779446} - - component: {fileID: 1485779445} - m_Layer: 0 - m_Name: Webcam-controller - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1485779445 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1485779444} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a85f8bd9399680347b4be72850a56fcf, type: 3} - m_Name: - m_EditorClassIdentifier: - display: {fileID: 378145456} - feedback: {fileID: 409590587} - popup: {fileID: 1374011069} - dynamic: {fileID: 1523390682} ---- !u!4 &1485779446 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1485779444} - 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: 0} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1493108462 GameObject: m_ObjectHideFlags: 0 @@ -2761,7 +2665,7 @@ GameObject: - component: {fileID: 1493108465} - component: {fileID: 1493108464} m_Layer: 5 - m_Name: video-bg + m_Name: Video Background m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -2781,7 +2685,7 @@ RectTransform: m_Children: - {fileID: 1159630773} m_Father: {fileID: 301088548} - m_RootOrder: 2 + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -3199,141 +3103,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1773033262} m_CullTransparentMesh: 1 ---- !u!1 &1785847567 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1785847568} - - component: {fileID: 1785847570} - - component: {fileID: 1785847569} - m_Layer: 5 - m_Name: Text (TMP) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1785847568 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1785847567} - 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: 414055543} - 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.00024414062} - m_SizeDelta: {x: 0, y: 0.00048828} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1785847569 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1785847567} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, 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_text: < Back to courses - m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - m_fontSharedMaterials: [] - m_fontMaterial: {fileID: 0} - m_fontMaterials: [] - m_fontColor32: - serializedVersion: 2 - rgba: 4281479730 - m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_enableVertexGradient: 0 - m_colorMode: 3 - m_fontColorGradient: - topLeft: {r: 1, g: 1, b: 1, a: 1} - topRight: {r: 1, g: 1, b: 1, a: 1} - bottomLeft: {r: 1, g: 1, b: 1, a: 1} - bottomRight: {r: 1, g: 1, b: 1, a: 1} - m_fontColorGradientPreset: {fileID: 0} - m_spriteAsset: {fileID: 0} - m_tintAllSprites: 0 - m_StyleSheet: {fileID: 0} - m_TextStyleHashCode: -1183493901 - m_overrideHtmlColors: 0 - m_faceColor: - serializedVersion: 2 - rgba: 4294967295 - m_fontSize: 48 - m_fontSizeBase: 48 - m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 18 - m_fontSizeMax: 72 - m_fontStyle: 0 - m_HorizontalAlignment: 2 - m_VerticalAlignment: 512 - m_textAlignment: 65535 - m_characterSpacing: 0 - m_wordSpacing: 0 - m_lineSpacing: 0 - m_lineSpacingMax: 0 - m_paragraphSpacing: 0 - m_charWidthMaxAdj: 0 - m_enableWordWrapping: 1 - m_wordWrappingRatios: 0.4 - m_overflowMode: 0 - m_linkedTextComponent: {fileID: 0} - parentLinkedComponent: {fileID: 0} - m_enableKerning: 1 - m_enableExtraPadding: 0 - checkPaddingRequired: 0 - m_isRichText: 1 - m_parseCtrlCharacters: 1 - m_isOrthographic: 1 - m_isCullingEnabled: 0 - m_horizontalMapping: 0 - m_verticalMapping: 0 - m_uvLineOffset: 0 - m_geometrySortingOrder: 0 - m_IsTextObjectScaleStatic: 0 - m_VertexBufferAutoSizeReduction: 0 - m_useMaxVisibleDescender: 1 - m_pageToDisplay: 1 - m_margin: {x: 0, y: 0, z: 0, w: 0} - m_isUsingLegacyAnimationComponent: 0 - m_isVolumetricText: 0 - m_hasFontAssetChanged: 0 - m_baseMaterial: {fileID: 0} - m_maskOffset: {x: 0, y: 0, z: 0, w: 0} ---- !u!222 &1785847570 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1785847567} - m_CullTransparentMesh: 1 --- !u!1 &1813638488 GameObject: m_ObjectHideFlags: 0 @@ -3347,7 +3116,7 @@ GameObject: - component: {fileID: 1813638491} - component: {fileID: 1813638490} m_Layer: 5 - m_Name: Next-sign-button + m_Name: Next Sign Button m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -3367,7 +3136,7 @@ RectTransform: m_Children: - {fileID: 1427866735} m_Father: {fileID: 301088548} - m_RootOrder: 5 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -3418,8 +3187,8 @@ MonoBehaviour: m_OnClick: m_PersistentCalls: m_Calls: - - m_Target: {fileID: 118887549} - m_TargetAssemblyTypeName: StartPause, Assembly-CSharp + - m_Target: {fileID: 301088551} + m_TargetAssemblyTypeName: TemplateCourse, Assembly-CSharp m_MethodName: NextSign m_Mode: 1 m_Arguments: @@ -3617,7 +3386,7 @@ GameObject: - component: {fileID: 2145235738} - component: {fileID: 2145235737} m_Layer: 5 - m_Name: Tutorial-image-bg + m_Name: Learnable Sprite m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/Assets/Courses/Scenes/Course_0.unity.meta b/Assets/Courses/Scenes/TemplateCourse.unity.meta similarity index 100% rename from Assets/Courses/Scenes/Course_0.unity.meta rename to Assets/Courses/Scenes/TemplateCourse.unity.meta diff --git a/Assets/Courses/Scripts/StartPause.cs b/Assets/Courses/Scripts/TemplateCourse.cs similarity index 64% rename from Assets/Courses/Scripts/StartPause.cs rename to Assets/Courses/Scripts/TemplateCourse.cs index 2a68003..774d69d 100644 --- a/Assets/Courses/Scripts/StartPause.cs +++ b/Assets/Courses/Scripts/TemplateCourse.cs @@ -5,11 +5,39 @@ using UnityEngine.UI; using UnityEngine.Video; /// -/// This class is responsible for loading all data from the Course-scriptableobject. -/// Specifically it fetches and displays the correct title, videos and images while also keeping track of the progress. +/// TemplateCourse scene manager /// -public class StartPause : MonoBehaviour +public class TemplateCourse : MonoBehaviour { + /// + /// Index to indicate which camera is being used + /// + private int camdex = 0; + + /// + /// This texture is used as an intermidiary between the camera output and the display image + /// + private WebCamTexture tex; + + /// + /// Reference to the RawImage that will display the video + /// + public RawImage webcamDisplay; + + /// + /// Reference to the button that is currently used to test the feedback-display + /// + public Button feedback; + + /// + /// This is a reference to the PANEL that holds the feedbackwindow + /// + public GameObject feedbackPopup; + + /// + /// This is a reference to the textfield that holds the part of the feedback-window that will change: bad/good/excellent + /// + public TMP_Text dynamic; /// /// Reference to instructional video player @@ -19,22 +47,21 @@ public class StartPause : MonoBehaviour /// Reference to pause button /// public Button button; - + /// /// Reference to sprite for the pause button /// public Sprite pauseSprite; - + /// /// Reference to the image for displaying the current words sprite /// public Image wordImage; - + /// /// Reference to the text object for displaying the current word /// - public TextMeshProUGUI title; - + public TMP_Text title; /// /// Reference to user list to get current user @@ -45,29 +72,27 @@ public class StartPause : MonoBehaviour /// The current user /// private User user; - + /// /// Current user progress for this course /// private Progress progress = null; - /// /// ScriptableObject with list of all courses /// public CourseList courselist; - + /// /// Reference to Course ScriptableObject /// private Course course; - /// /// Index of the current word/letter in the course.learnables list /// private int currentWordIndex = 0; - + /// /// This holds the amount of words in the course /// @@ -89,11 +114,6 @@ public class StartPause : MonoBehaviour /// public Button CoursesButton; - /// - /// Webcam class to close the webcam when the course is finished - /// - public Webcam Webcam; - /// /// DateTime containint the start moment /// @@ -102,16 +122,28 @@ public class StartPause : MonoBehaviour /// /// Reference to the timeSpent UI /// - public TextMeshProUGUI timeSpent; + public TMP_Text timeSpent; /// /// This function is called when the script is initialised. + /// It inactivatis the popup, finds a webcam to use and links it via the WebcamTexture to the display RawImage. /// It takes the correct course from the courselist, using the courseIndex. /// Then it checks whether or not the User has started the course yet, to possibly create a new progress atribute for the course. /// Then it sets up the course-screen to display relevant information from the course-scriptable. /// - public void Awake() + void Awake() { + // Setting up Webcam + feedbackPopup.SetActive(false); + if (WebCamTexture.devices.Length > 0) + { + WebCamDevice device = WebCamTexture.devices[camdex]; + tex = new WebCamTexture(device.name); + webcamDisplay.texture = tex; + + tex.Play(); + } + // Setting up course course = courselist.courses[courselist.currentCourseIndex]; maxWords = course.learnables.Count; @@ -140,7 +172,6 @@ public class StartPause : MonoBehaviour startMoment = DateTime.Now; } - // These two functions generate video and image from files /// /// This function uses the word_i integer to grab the correct video from the course.learnabels. /// When it has this video, it will load it into the videoplayer and set it to start. @@ -190,7 +221,6 @@ public class StartPause : MonoBehaviour } } - // Press next-sign button for next word /// /// This function is called when the next-sign button is pressed. /// It increased the wordindex and fetches new videos/images if index /// finishcourse is called to save the "finished" progress to the user. /// @@ -236,10 +265,78 @@ public class StartPause : MonoBehaviour timeSpent.text = time.ToString(@"hh\:mm\:ss"); // Link button - //CoursesButton.onClick.AddListener(() => { SceneManager.LoadScene("Assets/Common/Scenes/CoursesScreen.unity"); }); - CoursesButton.onClick.AddListener(() => { Webcam.LoadScene("Assets/Common/Scenes/CoursesScreen.unity"); }); + CoursesButton.onClick.AddListener(() => { SystemController.GetInstance().BackToPreviousScene(); }); progress.AddOrUpdate("courseProgress", 1f); userList.Save(); } + + /// + /// So long as there are cameras to use, you swap the camera you are using to another in the list. + /// + public void SwapCam() + { + if (WebCamTexture.devices.Length > 0) + { + // Stop the old camera + // If there was no camera playing before, then you dont have to reset the texture, as it wasn't assigned in the first place. + if (tex.isPlaying) + { + webcamDisplay.texture = null; + tex.Stop(); + tex = null; + } + // Find the new camera + camdex += 1; + camdex %= WebCamTexture.devices.Length; + // Start the new camera + WebCamDevice device = WebCamTexture.devices[camdex]; + tex = new WebCamTexture(device.name); + webcamDisplay.texture = tex; + + tex.Play(); + } + } + + /// + /// The normal sceneChanger cannot be used here since the camera also needs to be stopped. + /// This extra functionality is implemented in this function + /// + /// The path for the scene you want to travel to, assuming root-directory is Assets + public void Back() + { + webcamDisplay.texture = null; + tex.Stop(); + tex = null; + + SystemController.GetInstance().BackToPreviousScene(); + } + + /// + /// This function toggles between inactivity and activity for the popup panel. + /// This will be changed later when the model gets integrated, probably being timed to dissapear. + /// + public void ShowFeedback() + { + if (feedbackPopup.activeSelf) + { + dynamic.text = ""; + feedbackPopup.SetActive(false); + return; + } + double index = UnityEngine.Random.value; + if (index < 0.5) + { + dynamic.text = "Poor"; + } + else if (index > 0.8) + { + dynamic.text = "Excellent"; + } + else + { + dynamic.text = "Good"; + } + feedbackPopup.SetActive(true); + } } diff --git a/Assets/Courses/Scripts/Webcam.cs.meta b/Assets/Courses/Scripts/TemplateCourse.cs.meta similarity index 83% rename from Assets/Courses/Scripts/Webcam.cs.meta rename to Assets/Courses/Scripts/TemplateCourse.cs.meta index 9ae1349..d5f2567 100644 --- a/Assets/Courses/Scripts/Webcam.cs.meta +++ b/Assets/Courses/Scripts/TemplateCourse.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: a85f8bd9399680347b4be72850a56fcf +guid: 6b3f784c065813a4a8364b1299284816 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Courses/Scripts/Webcam.cs b/Assets/Courses/Scripts/Webcam.cs deleted file mode 100644 index 88027ba..0000000 --- a/Assets/Courses/Scripts/Webcam.cs +++ /dev/null @@ -1,128 +0,0 @@ -using TMPro; -using UnityEngine; -using UnityEngine.SceneManagement; -using UnityEngine.UI; - -/// -/// This class is dedicated to the camera and other actions that later could be connected to it, like the feedback. -/// It is responsible for finding working cameras, displaying them and being able to toggle between them. -/// This class also holds temporary code to display feedback via a button. -/// -public class Webcam : MonoBehaviour -{ - - /// - /// Index to indicate which camera is being used - /// - int camdex = 0; - - - /// - /// This texture is used as an intermidiary between the camera output and the display image - /// - WebCamTexture tex; - - /// - /// Reference to the RawImage that will display the video - /// - public RawImage display; - - /// - /// Reference to the button that is currently used to test the feedback-display - /// - public Button feedback; - - /// - /// This is a reference to the PANEL that holds the feedbackwindow - /// - public GameObject popup; - - /// - /// This is a reference to the textfield that holds the part of the feedback-window that will change: bad/good/excellent - /// - public TextMeshProUGUI dynamic; - - /// - /// This function is called at the start of the frame. - /// It inactivatis the popup, finds a webcam to use and links it via the WebcamTexture to the display RawImage. - /// - void Awake() - { - popup.SetActive(false); - if (WebCamTexture.devices.Length > 0) { - WebCamDevice device = WebCamTexture.devices[camdex]; - tex = new WebCamTexture(device.name); - display.texture = tex; - - tex.Play(); - } - } - - /// - /// So long as there are cameras to use, you swap the camera you are using to another in the list. - /// - public void SwapCam() - { - if (WebCamTexture.devices.Length > 0) - { - // Stop the old camera - // If there was no camera playing before, then you dont have to reset the texture, as it wasn't assigned in the first place. - if (tex.isPlaying) { - display.texture = null; - tex.Stop(); - tex = null; - } - // Find the new camera - camdex += 1; - camdex %= WebCamTexture.devices.Length; - // Start the new camera - WebCamDevice device = WebCamTexture.devices[camdex]; - tex = new WebCamTexture(device.name); - display.texture = tex; - - tex.Play(); - } - } - - /// - /// The normal sceneChanger cannot be used here since the camera also needs to be stopped. - /// This extra functionality is implemented in this function - /// - /// The path for the scene you want to travel to, assuming root-directory is Assets - public void LoadScene(string sceneName) - { - display.texture = null; - tex.Stop(); - tex = null; - - SceneManager.LoadScene(sceneName); - } - - /// - /// This function toggles between inactivity and activity for the popup panel. - /// This will be changed later when the model gets integrated, probably being timed to dissapear. - /// - public void Show_feedback() - { - if (popup.activeSelf) - { - dynamic.text = ""; - popup.SetActive(false); - return; - } - double index = UnityEngine.Random.value; - if (index < 0.5) - { - dynamic.text = "Poor"; - } - else if (index > 0.8) - { - dynamic.text = "Excellent"; - } - else - { - dynamic.text = "Good"; - } - popup.SetActive(true); - } -} diff --git a/Assets/SpellingBee/Scenes/Game.unity b/Assets/SpellingBee/Scenes/Game.unity index 44d2ace..2838990 100644 --- a/Assets/SpellingBee/Scenes/Game.unity +++ b/Assets/SpellingBee/Scenes/Game.unity @@ -324,7 +324,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 2 + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &519420028 GameObject: @@ -1111,7 +1111,7 @@ PrefabInstance: m_Modifications: - target: {fileID: 8299246693487308512, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode - value: 5 + value: 1 objectReference: {fileID: 0} - target: {fileID: 8299246693487308512, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target @@ -1119,7 +1119,7 @@ PrefabInstance: objectReference: {fileID: 1537631145} - target: {fileID: 8299246693487308512, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName - value: LoadScene + value: GotoThemeSelection objectReference: {fileID: 0} - target: {fileID: 8299246693487308512, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3} propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName @@ -2181,50 +2181,6 @@ MonoBehaviour: m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} ---- !u!1 &1122939480 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1122939482} - - component: {fileID: 1122939481} - m_Layer: 0 - m_Name: SceneControl - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1122939481 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1122939480} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 949ba4da8595d52aebc98e6f9b6a405e, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!4 &1122939482 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1122939480} - 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: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1172084826 GameObject: m_ObjectHideFlags: 0 @@ -3135,19 +3091,7 @@ MonoBehaviour: m_TargetGraphic: {fileID: 1346891279} m_OnClick: m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 0} - m_TargetAssemblyTypeName: - m_MethodName: - m_Mode: 1 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 + m_Calls: [] --- !u!114 &1346891279 MonoBehaviour: m_ObjectHideFlags: 0 @@ -3777,7 +3721,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: display: {fileID: 588634507} - dynamic: {fileID: 0} --- !u!1 &1570625040 GameObject: m_ObjectHideFlags: 0 @@ -4453,7 +4396,7 @@ RectTransform: m_Children: - {fileID: 906197777} m_Father: {fileID: 0} - m_RootOrder: 3 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} diff --git a/Assets/SpellingBee/Scripts/GameController.cs b/Assets/SpellingBee/Scripts/GameController.cs index ce0693b..08968c1 100644 --- a/Assets/SpellingBee/Scripts/GameController.cs +++ b/Assets/SpellingBee/Scripts/GameController.cs @@ -330,11 +330,12 @@ public class GameController : MonoBehaviour if (correctLetters + incorrectLetters > 0) { accuracyText.text = ((correctLetters) * 100f / (correctLetters + incorrectLetters)).ToString("#.##") + "%"; - } else + } + else { accuracyText.text = "-"; } - + // Words wordsText.text = spelledWords.ToString(); diff --git a/Assets/SpellingBee/Scripts/SpellingBeeWebcam.cs b/Assets/SpellingBee/Scripts/SpellingBeeWebcam.cs index 3cbbc0a..30a01d5 100644 --- a/Assets/SpellingBee/Scripts/SpellingBeeWebcam.cs +++ b/Assets/SpellingBee/Scripts/SpellingBeeWebcam.cs @@ -1,10 +1,11 @@ -using TMPro; using UnityEngine; -using UnityEngine.SceneManagement; using UnityEngine.UI; +/// +/// Class to manage all webcam stuff inside the SpellingBee minigame +/// public class SpellingBeeWebcam : MonoBehaviour -{ +{ /// /// Index of the current camera /// @@ -21,12 +22,7 @@ public class SpellingBeeWebcam : MonoBehaviour public RawImage display; /// - /// For later use - /// - public TextMeshProUGUI dynamic; - - /// - /// Initialize the camera view + /// Setup the webcam correctly /// void Awake() { @@ -38,7 +34,7 @@ public class SpellingBeeWebcam : MonoBehaviour } /// - /// Switch to a different webcam + /// Swap webcam by cycling through the `WebCamTexture.devices` list /// public void SwapCam() { @@ -65,12 +61,12 @@ public class SpellingBeeWebcam : MonoBehaviour /// /// Scene changing is implemented here to avoid problems with webcam /// - public void LoadScene(string sceneName) + public void GotoThemeSelection() { display.texture = null; tex.Stop(); tex = null; - SceneManager.LoadScene(sceneName); + SystemController.GetInstance().BackToPreviousScene(); } } diff --git a/Assets/users.json b/Assets/users.json deleted file mode 100644 index cf9182e..0000000 --- a/Assets/users.json +++ /dev/null @@ -1 +0,0 @@ -{"currentUserIndex":0,"storedUsers":[{"username":"testkonijn","avatar":{"instanceID":0},"playtime":0.0,"courses":[{"entries":[{"key":"courseIndex","bytes":[0,1,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,12,2,0,0,0,70,65,115,115,101,109,98,108,121,45,67,83,104,97,114,112,44,32,86,101,114,115,105,111,110,61,48,46,48,46,48,46,48,44,32,67,117,108,116,117,114,101,61,110,101,117,116,114,97,108,44,32,80,117,98,108,105,99,75,101,121,84,111,107,101,110,61,110,117,108,108,5,1,0,0,0,11,67,111,117,114,115,101,73,110,100,101,120,1,0,0,0,7,118,97,108,117,101,95,95,0,8,2,0,0,0,0,0,0,0,11]},{"key":"courseProgress","bytes":[0,1,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,4,1,0,0,0,13,83,121,115,116,101,109,46,83,105,110,103,108,101,1,0,0,0,7,109,95,118,97,108,117,101,0,11,205,204,76,62,11]}]}],"minigames":[{"entries":[{"key":"minigameIndex","bytes":[0,1,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,12,2,0,0,0,70,65,115,115,101,109,98,108,121,45,67,83,104,97,114,112,44,32,86,101,114,115,105,111,110,61,48,46,48,46,48,46,48,44,32,67,117,108,116,117,114,101,61,110,101,117,116,114,97,108,44,32,80,117,98,108,105,99,75,101,121,84,111,107,101,110,61,110,117,108,108,5,1,0,0,0,13,77,105,110,105,103,97,109,101,73,110,100,101,120,1,0,0,0,7,118,97,108,117,101,95,95,0,8,2,0,0,0,0,0,0,0,11]},{"key":"highscore","bytes":[0,1,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,4,1,0,0,0,12,83,121,115,116,101,109,46,73,110,116,51,50,1,0,0,0,7,109,95,118,97,108,117,101,0,8,0,0,0,0,11]},{"key":"scores","bytes":[0,1,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,12,2,0,0,0,70,65,115,115,101,109,98,108,121,45,67,83,104,97,114,112,44,32,86,101,114,115,105,111,110,61,48,46,48,46,48,46,48,44,32,67,117,108,116,117,114,101,61,110,101,117,116,114,97,108,44,32,80,117,98,108,105,99,75,101,121,84,111,107,101,110,61,110,117,108,108,4,1,0,0,0,129,1,83,121,115,116,101,109,46,67,111,108,108,101,99,116,105,111,110,115,46,71,101,110,101,114,105,99,46,76,105,115,116,96,49,91,91,71,97,109,101,67,111,110,116,114,111,108,108,101,114,43,83,99,111,114,101,44,32,65,115,115,101,109,98,108,121,45,67,83,104,97,114,112,44,32,86,101,114,115,105,111,110,61,48,46,48,46,48,46,48,44,32,67,117,108,116,117,114,101,61,110,101,117,116,114,97,108,44,32,80,117,98,108,105,99,75,101,121,84,111,107,101,110,61,110,117,108,108,93,93,3,0,0,0,6,95,105,116,101,109,115,5,95,115,105,122,101,8,95,118,101,114,115,105,111,110,4,0,0,22,71,97,109,101,67,111,110,116,114,111,108,108,101,114,43,83,99,111,114,101,91,93,2,0,0,0,8,8,9,3,0,0,0,10,0,0,0,10,0,0,0,7,3,0,0,0,0,1,0,0,0,10,0,0,0,4,20,71,97,109,101,67,111,110,116,114,111,108,108,101,114,43,83,99,111,114,101,2,0,0,0,9,4,0,0,0,9,5,0,0,0,9,6,0,0,0,9,7,0,0,0,9,8,0,0,0,9,9,0,0,0,9,10,0,0,0,9,11,0,0,0,9,12,0,0,0,9,13,0,0,0,5,4,0,0,0,20,71,97,109,101,67,111,110,116,114,111,108,108,101,114,43,83,99,111,114,101,2,0,0,0,10,115,99,111,114,101,86,97,108,117,101,4,116,105,109,101,0,1,8,2,0,0,0,162,0,0,0,6,14,0,0,0,20,51,47,49,51,47,50,48,50,51,32,53,58,49,55,58,48,49,32,80,77,1,5,0,0,0,4,0,0,0,153,0,0,0,6,15,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,53,58,51,56,58,53,54,1,6,0,0,0,4,0,0,0,17,0,0,0,6,16,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,53,58,51,57,58,53,48,1,7,0,0,0,4,0,0,0,16,0,0,0,6,17,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,55,58,53,51,58,50,50,1,8,0,0,0,4,0,0,0,14,0,0,0,6,18,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,55,58,53,49,58,51,49,1,9,0,0,0,4,0,0,0,12,0,0,0,6,19,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,55,58,50,55,58,48,55,1,10,0,0,0,4,0,0,0,11,0,0,0,6,20,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,53,58,51,51,58,53,48,1,11,0,0,0,4,0,0,0,11,0,0,0,6,21,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,54,58,50,49,58,52,55,1,12,0,0,0,4,0,0,0,11,0,0,0,6,22,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,55,58,51,54,58,50,56,1,13,0,0,0,4,0,0,0,9,0,0,0,6,23,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,55,58,51,48,58,49,56,11]}]}]}]} \ No newline at end of file diff --git a/Assets/users.json.meta b/Assets/users.json.meta deleted file mode 100644 index e470439..0000000 --- a/Assets/users.json.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 29594155802425940b4fd7351ad447e8 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index d45569a..a17bf9c 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -6,10 +6,10 @@ EditorBuildSettings: serializedVersion: 2 m_Scenes: - enabled: 1 - path: Assets/Common/Scenes/WebcamAuthorization.unity + path: Assets/Common/Scenes/Boot.unity guid: ac3a19079fe45844a996d6a9eb62ad76 - enabled: 1 - path: Assets/Common/Scenes/StartScreen.unity + path: Assets/Common/Scenes/MainMenuScreen.unity guid: a50df781449ac1fa5a036626c4710b24 - enabled: 1 path: Assets/Accounts/Scenes/UserCreationScreen.unity @@ -21,7 +21,7 @@ EditorBuildSettings: path: Assets/Accounts/Scenes/UserProgressScreen.unity guid: 222ac8b048efd45478729efeea1f6110 - enabled: 1 - path: Assets/Common/Scenes/CoursesScreen.unity + path: Assets/Common/Scenes/CoursesMenuScreen.unity guid: 4fb0b014dad7fcdcb96413a2c31b9cd1 - enabled: 1 path: Assets/Common/Scenes/ListMinigamesScreen.unity @@ -33,18 +33,18 @@ EditorBuildSettings: path: Assets/Common/Scenes/SettingsScreen.unity guid: 082b8c0d94b135d4a98f83699c92e45b - enabled: 1 - path: Assets/Courses/Scenes/Course_0.unity + path: Assets/Common/Scenes/CourseActivityScreen.unity + guid: 5ff44b09f5858a64692f58938fd6d2ff + - enabled: 1 + path: Assets/Common/Scenes/MinigameActivityScreen.unity + guid: 8e27404f21454dc4583f76b4c7df0c30 + - enabled: 1 + path: Assets/Common/Scenes/ThemeSelectionScreen.unity + guid: 2dfa1265c9d65014c90941ac4240a977 + - enabled: 1 + path: Assets/Courses/Scenes/TemplateCourse.unity guid: 2cda990e2423bbf4892e6590ba056729 - enabled: 1 path: Assets/SpellingBee/Scenes/Game.unity guid: 652195ae9a0ff3ad18f6338db6a909bd - - enabled: 1 - path: Assets/Common/Scenes/InfoMinigame.unity - guid: 8e27404f21454dc4583f76b4c7df0c30 - - enabled: 1 - path: Assets/Common/Scenes/InfoCourse.unity - guid: 5ff44b09f5858a64692f58938fd6d2ff - - enabled: 1 - path: Assets/Common/Scenes/ThemeSelection.unity - guid: 2dfa1265c9d65014c90941ac4240a977 m_configObjects: {} diff --git a/Assets/Common/Scripts/CourseScreenManager.cs b/assets/common/scripts/CourseMenuScreen.cs similarity index 94% rename from Assets/Common/Scripts/CourseScreenManager.cs rename to assets/common/scripts/CourseMenuScreen.cs index 9b223a5..b229b22 100644 --- a/Assets/Common/Scripts/CourseScreenManager.cs +++ b/assets/common/scripts/CourseMenuScreen.cs @@ -1,12 +1,11 @@ using System; using System.Collections.Generic; using UnityEngine; -using UnityEngine.SceneManagement; /// -/// CourseScreen scene manager +/// CourseMenuScreen scene manager /// -public class CourseScreenManager : MonoBehaviour +public class CourseMenuScreen : MonoBehaviour { /// /// Reference to text that displays when there are no recent courses @@ -79,6 +78,6 @@ public class CourseScreenManager : MonoBehaviour /// The path to the new scene (path == $"Assets/{sceneName}") public void LoadScene(string sceneName) { - SceneManager.LoadScene(sceneName); + SystemController.GetInstance().LoadNextScene(sceneName); } } diff --git a/Assets/Common/Scripts/CourseScreenManager.cs.meta b/assets/common/scripts/CourseMenuScreen.cs.meta similarity index 100% rename from Assets/Common/Scripts/CourseScreenManager.cs.meta rename to assets/common/scripts/CourseMenuScreen.cs.meta