Resolve WES-99 "Cc refactor"
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
/// <summary>
|
||||
/// ChangeUserScreen scene manager
|
||||
/// </summary>
|
||||
public class ChangeUserScreen : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
@@ -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<Image>())
|
||||
if (img != background)
|
||||
{
|
||||
img.sprite = user.avatar;
|
||||
break;
|
||||
}
|
||||
instance.transform.Find("Avatar").GetComponent<Image>().sprite = user.avatar;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,6 +82,14 @@ public class ChangeUserScreen : MonoBehaviour
|
||||
{
|
||||
userList.ChangeCurrentUser(currentUserIndex);
|
||||
userList.Save();
|
||||
SceneManager.LoadScene("Common/Scenes/StartScreen");
|
||||
SystemController.GetInstance().BackToPreviousScene();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Callback to load the UserCreationScreen scene
|
||||
/// </summary>
|
||||
public void GotoUserCreation()
|
||||
{
|
||||
SystemController.GetInstance().LoadNextScene("Accounts/Scenes/UserCreationScreen");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,6 @@ public class Progress
|
||||
}
|
||||
}
|
||||
|
||||
// Get the value of type `T` belonging to `key`
|
||||
/// <summary>
|
||||
/// Get the data object of a certain key
|
||||
/// </summary>
|
||||
|
||||
@@ -2,7 +2,6 @@ using System.Collections.Generic;
|
||||
using System.Text.RegularExpressions;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
/// <summary>
|
||||
@@ -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<Image>())
|
||||
if (img != background)
|
||||
{
|
||||
img.sprite = sprites[i];
|
||||
break;
|
||||
}
|
||||
instance.transform.Find("Image").GetComponent<Image>().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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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}
|
||||
@@ -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}
|
||||
@@ -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}
|
||||
15
Assets/Common/Scripts/BackButton.cs
Normal file
15
Assets/Common/Scripts/BackButton.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// Script managing the default 'back'-button action
|
||||
/// </summary>
|
||||
public class BackButton : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// The default 'back'-button action: go back to the previous scene
|
||||
/// </summary>
|
||||
public void Back()
|
||||
{
|
||||
SystemController.GetInstance().BackToPreviousScene();
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 949ba4da8595d52aebc98e6f9b6a405e
|
||||
guid: c3dd279b546423e4a8a1b28819a6c4a1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
@@ -1,12 +1,11 @@
|
||||
using System.Collections;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
/// <summary>
|
||||
/// Authorize and check for available webcam(s)
|
||||
/// </summary>
|
||||
public class WebcamAuthorization : MonoBehaviour
|
||||
public class BootScreen : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// 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
|
||||
{
|
||||
@@ -1,35 +0,0 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
/// <summary>
|
||||
/// Class to handle scene loading callbacks
|
||||
/// </summary>
|
||||
public class ChangeSceneOnClick : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// Method used as callback for gameobject onClick events
|
||||
/// </summary>
|
||||
/// <param name="sceneName">The path to the new scene (<c>path == $"Assets/{sceneName}"</c>)</param>
|
||||
public void LoadScene(string sceneName)
|
||||
{
|
||||
SceneManager.LoadScene(sceneName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method used as callback for gameobject onClick events
|
||||
/// </summary>
|
||||
/// <param name="scene">Reference to a scene</param>
|
||||
public void LoadScene(Scene scene)
|
||||
{
|
||||
SceneManager.LoadScene(scene.buildIndex);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method used as callback from gameobject onClick events
|
||||
/// </summary>
|
||||
/// <param name="buildIndex">Build index of the scene to be loaded</param>
|
||||
public void LoadScene(int buildIndex)
|
||||
{
|
||||
SceneManager.LoadScene(buildIndex);
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,16 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using TMPro; // For text
|
||||
|
||||
/// <summary>
|
||||
/// Manager infopage for the Courses
|
||||
/// </summary>
|
||||
public class InfoCourse : MonoBehaviour
|
||||
public class CourseActivityScreen : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// Reference to the courses
|
||||
/// </summary>
|
||||
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.
|
||||
|
||||
/// <summary>
|
||||
@@ -43,17 +41,15 @@ public class InfoCourse : MonoBehaviour
|
||||
/// <summary>
|
||||
/// Progress bar Display
|
||||
/// </summary>
|
||||
public Slider slider;
|
||||
|
||||
|
||||
// Start is called before the first frame update
|
||||
public Slider progressBar;
|
||||
|
||||
/// <summary>
|
||||
/// Sets the infopage for a given course
|
||||
/// </summary>
|
||||
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<float>("courseProgress");
|
||||
progressBar.value = progress.Get<float>("courseProgress");
|
||||
else
|
||||
slider.value = 0.0f;
|
||||
progressBar.value = 0.0f;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Callback to start the course
|
||||
/// </summary>
|
||||
public void StartCourse()
|
||||
{
|
||||
SystemController.GetInstance().LoadNextScene("Courses/Scenes/TemplateCourse");
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
/// <summary>
|
||||
@@ -68,6 +67,6 @@ public class CourseItem : MonoBehaviour
|
||||
slider.GetComponent<Slider>().value = progress;
|
||||
|
||||
// Add click functionality
|
||||
button.onClick.AddListener(() => SceneManager.LoadScene("Common/Scenes/InfoCourse"));
|
||||
button.onClick.AddListener(() => SystemController.GetInstance().LoadNextScene("Common/Scenes/CourseActivityScreen"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
/// <summary>
|
||||
/// CourseScreen scene manager
|
||||
/// </summary>
|
||||
public class CourseScreenManager : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// Reference to text that displays when there are no recent courses
|
||||
/// </summary>
|
||||
public GameObject noRecentCourses;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to recent-courses-list container object
|
||||
/// </summary>
|
||||
public Transform recentCoursesContainer;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to recommended-courses-list container object
|
||||
/// </summary>
|
||||
public Transform recommendedCoursesContainer;
|
||||
|
||||
/// <summary>
|
||||
/// Prefab of the course item object
|
||||
/// </summary>
|
||||
public GameObject courseItem;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the users so we can get the current user;
|
||||
/// </summary>
|
||||
public UserList userList;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the courses
|
||||
/// </summary>
|
||||
public CourseList courseList;
|
||||
|
||||
/// <summary>
|
||||
/// Start is called before the first frame update
|
||||
/// </summary>
|
||||
void Start()
|
||||
{
|
||||
User user = userList.GetCurrentUser();
|
||||
|
||||
// Recent courses
|
||||
List<Tuple<CourseIndex, float>> recentCourses = user.GetRecentCourses();
|
||||
noRecentCourses.SetActive(recentCourses.Count <= 0);
|
||||
foreach (Tuple<CourseIndex, float> course in recentCourses)
|
||||
{
|
||||
// Create instance of prefab
|
||||
GameObject instance = GameObject.Instantiate(courseItem, recentCoursesContainer);
|
||||
|
||||
// Dynamically load appearance
|
||||
CourseItem item = instance.GetComponent<CourseItem>();
|
||||
item.course = courseList.courses.Find((j) => j.index == course.Item1);
|
||||
item.progress = course.Item2;
|
||||
}
|
||||
|
||||
// Recommended courses
|
||||
List<Tuple<CourseIndex, float>> recommenedCourses = user.GetRecommendedCourses();
|
||||
foreach (Tuple<CourseIndex, float> course in recommenedCourses)
|
||||
{
|
||||
// Create instance of prefab
|
||||
GameObject instance = GameObject.Instantiate(courseItem, recommendedCoursesContainer);
|
||||
|
||||
// Dynamically load appearance
|
||||
CourseItem item = instance.GetComponent<CourseItem>();
|
||||
item.course = courseList.courses.Find((j) => j.index == course.Item1);
|
||||
item.progress = course.Item2;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method used as callback for course item onClick events
|
||||
/// </summary>
|
||||
/// <param name="sceneName">The path to the new scene (<c>path == $"Assets/{sceneName}"</c>)</param>
|
||||
public void LoadScene(string sceneName)
|
||||
{
|
||||
SceneManager.LoadScene(sceneName);
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,9 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
/// <summary>
|
||||
/// ListCourseScreen scene manager
|
||||
/// </summary>
|
||||
public class CourseListManager : MonoBehaviour
|
||||
public class ListCoursesScreen : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// Reference to the course-list container object
|
||||
@@ -40,9 +39,8 @@ public class CourseListManager : MonoBehaviour
|
||||
/// <summary>
|
||||
/// Method used as callback for course item onClick events
|
||||
/// </summary>
|
||||
/// <param name="sceneName">The path to the new scene (<c>path == $"Assets/{sceneName}"</c>)</param>
|
||||
public void LoadScene(string sceneName)
|
||||
public void GotoCourseInfo()
|
||||
{
|
||||
SceneManager.LoadScene(sceneName);
|
||||
SystemController.GetInstance().LoadNextScene("Common/Scenes/CourseActivityScreen");
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,9 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
/// <summary>
|
||||
/// ListMinigameScreen scene manager
|
||||
/// </summary>
|
||||
public class MinigameListManager : MonoBehaviour
|
||||
public class ListMinigamesScreen : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// Reference to minigame-list container object
|
||||
@@ -43,6 +42,6 @@ public class MinigameListManager : MonoBehaviour
|
||||
/// <param name="sceneName">The path to the new scene (<c>path == $"Assets/{sceneName}"</c>)</param>
|
||||
public void LoadScene(string sceneName)
|
||||
{
|
||||
SceneManager.LoadScene(sceneName);
|
||||
SystemController.GetInstance().LoadNextScene(sceneName);
|
||||
}
|
||||
}
|
||||
57
Assets/Common/Scripts/MainMenuScreen.cs
Normal file
57
Assets/Common/Scripts/MainMenuScreen.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// StartScreen scene manager
|
||||
/// </summary>
|
||||
public class MainMenuScreen : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// Referece to the userlist to check whether an user account is present
|
||||
/// </summary>
|
||||
public UserList userList;
|
||||
|
||||
/// <summary>
|
||||
/// Check on load whether a user is already present,
|
||||
/// if not load the UserCreationScreen scene so the user can create a new account
|
||||
/// </summary>
|
||||
void Awake()
|
||||
{
|
||||
if (!File.Exists(UserList.PATH) || userList.GetUsers().Count <= 0)
|
||||
{
|
||||
SystemController.GetInstance().LoadNextScene("Accounts/Scenes/UserCreationScreen");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Quit the application
|
||||
/// </summary>
|
||||
public void QuitApplication()
|
||||
{
|
||||
Application.Quit();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load the `CoursesMenuScreen` scene
|
||||
/// </summary>
|
||||
public void GotoCourses()
|
||||
{
|
||||
SystemController.GetInstance().LoadNextScene("Common/Scenes/CoursesMenuScreen");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load the `ListMinigamesScreen` scene
|
||||
/// </summary>
|
||||
public void GotoMinigames()
|
||||
{
|
||||
SystemController.GetInstance().LoadNextScene("Common/Scenes/ListMinigamesScreen");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load the `SettingsScreen` scene
|
||||
/// </summary>
|
||||
public void GotoSettings()
|
||||
{
|
||||
SystemController.GetInstance().LoadNextScene("Common/Scenes/SettingsScreen");
|
||||
}
|
||||
}
|
||||
@@ -40,5 +40,4 @@ public class Minigame : ScriptableObject
|
||||
/// An explanation on how to play the game and score points
|
||||
/// </summary>
|
||||
public string controls;
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
/// <summary>
|
||||
/// Manager infopage for the Minigames
|
||||
/// </summary>
|
||||
public class InfoMinigame : MonoBehaviour
|
||||
public class MinigameActivityScreen : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// Reference to the Minigames
|
||||
/// </summary>
|
||||
public MinigameList list;
|
||||
public MinigameList minigameList;
|
||||
|
||||
/// <summary>
|
||||
/// Title Display
|
||||
@@ -44,8 +40,6 @@ public class InfoMinigame : MonoBehaviour
|
||||
/// </summary>
|
||||
public TMP_Text controls;
|
||||
|
||||
// Scores for each user
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the users
|
||||
/// </summary>
|
||||
@@ -66,7 +60,6 @@ public class InfoMinigame : MonoBehaviour
|
||||
/// </summary>
|
||||
public GameObject prefab;
|
||||
|
||||
// Start is called before the first frame update
|
||||
/// <summary>
|
||||
/// Sets the infopage for a given minigame
|
||||
/// </summary>
|
||||
@@ -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<Tuple<string, Sprite, Score>> allScores = new List<Tuple<string, Sprite, Score>>();
|
||||
List<Tuple<string, Sprite, GameController.Score>> allScores = new List<Tuple<string, Sprite, GameController.Score>>();
|
||||
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<Score> scores = progress.Get<List<Score>>("scores");
|
||||
foreach (Score score in scores)
|
||||
List<GameController.Score> scores = progress.Get<List<GameController.Score>>("scores");
|
||||
foreach (GameController.Score score in scores)
|
||||
{
|
||||
allScores.Add(new Tuple<string, Sprite, Score>(user.username, user.avatar, score));
|
||||
allScores.Add(new Tuple<string, Sprite, GameController.Score>(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<string, Sprite, Score> tup in allScores.Take(3))
|
||||
foreach (Tuple<string, Sprite, GameController.Score> 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<TMP_Text>().text = username;
|
||||
instance.transform.Find("Avatar").GetComponent<Image>().sprite = sprite;
|
||||
instance.transform.Find("Score").GetComponent<TMP_Text>().text = score.scoreValue.ToString();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,12 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// Handles the display of minigames in the ListMinigameScreen scene
|
||||
/// </summary>
|
||||
public class MinigameItem : MonoBehaviour
|
||||
{
|
||||
{
|
||||
/// <summary>
|
||||
/// Reference to the minigame object
|
||||
/// </summary>
|
||||
@@ -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");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
/// <summary>
|
||||
/// StartScreen scene manager
|
||||
/// </summary>
|
||||
public class StartScreenManager : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// Referece to the userlist to check whether an user account is present
|
||||
/// </summary>
|
||||
public UserList userList;
|
||||
|
||||
/// <summary>
|
||||
/// Check on load whether a user is already present,
|
||||
/// if not load the UserCreationScreen scene so the user can create a new account
|
||||
/// </summary>
|
||||
void Awake()
|
||||
{
|
||||
if (!File.Exists(UserList.PATH) || userList.GetUsers().Count <= 0)
|
||||
{
|
||||
SceneManager.LoadScene("Accounts/Scenes/UserCreationScreen");
|
||||
}
|
||||
}
|
||||
|
||||
public void QuitApplication()
|
||||
{
|
||||
Application.Quit();
|
||||
}
|
||||
}
|
||||
104
Assets/Common/Scripts/SystemController.cs
Normal file
104
Assets/Common/Scripts/SystemController.cs
Normal file
@@ -0,0 +1,104 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
/// <summary>
|
||||
/// SystemController singleton
|
||||
/// </summary>
|
||||
public class SystemController
|
||||
{
|
||||
/// <summary>
|
||||
/// The instance controlling the singleton
|
||||
/// </summary>
|
||||
private static SystemController instance = null;
|
||||
|
||||
/// <summary>
|
||||
/// Stack of the loaded scenes, used to easily go back to previous scenes
|
||||
/// </summary>
|
||||
private Stack<int> sceneStack = new Stack<int>();
|
||||
|
||||
/// <summary>
|
||||
/// Get the instance loaded by the singleton
|
||||
/// </summary>
|
||||
/// <returns>SystemController instance</returns>
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load the scene and push on the stack
|
||||
/// </summary>
|
||||
/// <param name="scenePath">Path of the scene</param>
|
||||
public void LoadNextScene(string scenePath)
|
||||
{
|
||||
LoadNextScene(SceneUtility.GetBuildIndexByScenePath(scenePath));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load the scene and push on the stack
|
||||
/// </summary>
|
||||
/// <param name="sceneIndex">Buildindex of the scene</param>
|
||||
public void LoadNextScene(int sceneIndex)
|
||||
{
|
||||
sceneStack.Push(sceneIndex);
|
||||
SceneManager.LoadScene(sceneIndex);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Swap the current scene with the new scene on the stack
|
||||
/// </summary>
|
||||
/// <param name="scenePath">Path of the scene</param>
|
||||
public void SwapScene(string scenePath)
|
||||
{
|
||||
SwapScene(SceneUtility.GetBuildIndexByScenePath(scenePath));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Swap the current scene with the new scene on the stack
|
||||
/// </summary>
|
||||
/// <param name="sceneIndex">Buildindex of the scene</param>
|
||||
public void SwapScene(int sceneIndex)
|
||||
{
|
||||
sceneStack.Pop();
|
||||
LoadNextScene(sceneIndex);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Go back to the previous scene and unload the current scene
|
||||
/// </summary>
|
||||
public void BackToPreviousScene()
|
||||
{
|
||||
sceneStack.Pop();
|
||||
|
||||
if (sceneStack.Count > 0) SceneManager.LoadScene(sceneStack.Peek());
|
||||
else Application.Quit();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Go back to a specific scene, unloading all the scenes on the way
|
||||
/// </summary>
|
||||
/// <param name="scenePath">Path of the scene</param>
|
||||
public void BackToScene(string scenePath)
|
||||
{
|
||||
BackToScene(SceneUtility.GetBuildIndexByScenePath(scenePath));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Go back to a specific scene, unloading all the scene on the way
|
||||
/// </summary>
|
||||
/// <param name="sceneIndex">Buildindex of the scene</param>
|
||||
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();
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 00e2726fda637a1488461b7a43e46343
|
||||
guid: e901944427bb1104a881881efebd3737
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
@@ -1,12 +1,10 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
/// <summary>
|
||||
/// Controller for the theme selection screen
|
||||
/// ThemeSelectionScreen scene manager
|
||||
/// </summary>
|
||||
public class ThemeSelectionController : MonoBehaviour
|
||||
public class ThemeSelectionScreen : MonoBehaviour
|
||||
{
|
||||
[Header("Theme Selection")]
|
||||
/// <summary>
|
||||
/// Theme prefab
|
||||
/// </summary>
|
||||
@@ -18,9 +16,9 @@ public class ThemeSelectionController : MonoBehaviour
|
||||
public Transform themesContainer;
|
||||
|
||||
/// <summary>
|
||||
/// Function that is called upon loading the scene
|
||||
/// Start is called before the first frame update
|
||||
/// </summary>
|
||||
public void Start()
|
||||
void Start()
|
||||
{
|
||||
// TODO: change to ScriptableObject
|
||||
ThemeList themeList = ThemeLoader.LoadJson();
|
||||
@@ -41,11 +39,12 @@ public class ThemeSelectionController : MonoBehaviour
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Function that is called upon a button click
|
||||
/// Load the game with a specified theme
|
||||
/// </summary>
|
||||
/// <param name="clickedTheme">Name of the clicked theme</param>
|
||||
public void OnButtonClick(string clickedTheme)
|
||||
{
|
||||
PlayerPrefs.SetString("themeName", clickedTheme);
|
||||
SceneManager.LoadScene(PlayerPrefs.GetString("gamePath"));
|
||||
SystemController.GetInstance().SwapScene(PlayerPrefs.GetString("gamePath"));
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 68caaa5508a4d40448b47630ff86f035
|
||||
guid: 30d9f9130bf1d414aaad006b2177bdea
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
@@ -1,6 +1,5 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
/// <summary>
|
||||
@@ -44,7 +43,7 @@ public class UserButton : MonoBehaviour
|
||||
/// </summary>
|
||||
public void OpenProgressCallback()
|
||||
{
|
||||
SceneManager.LoadScene("Accounts/Scenes/UserProgressScreen");
|
||||
SystemController.GetInstance().LoadNextScene("Accounts/Scenes/UserProgressScreen");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -52,7 +51,7 @@ public class UserButton : MonoBehaviour
|
||||
/// </summary>
|
||||
public void ChangeUserCallback()
|
||||
{
|
||||
SceneManager.LoadScene("Accounts/Scenes/ChangeUserScreen");
|
||||
SystemController.GetInstance().LoadNextScene("Accounts/Scenes/ChangeUserScreen");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -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
|
||||
@@ -5,11 +5,39 @@ using UnityEngine.UI;
|
||||
using UnityEngine.Video;
|
||||
|
||||
/// <summary>
|
||||
/// 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
|
||||
/// </summary>
|
||||
public class StartPause : MonoBehaviour
|
||||
public class TemplateCourse : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// Index to indicate which camera is being used
|
||||
/// </summary>
|
||||
private int camdex = 0;
|
||||
|
||||
/// <summary>
|
||||
/// This texture is used as an intermidiary between the camera output and the display image
|
||||
/// </summary>
|
||||
private WebCamTexture tex;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the RawImage that will display the video
|
||||
/// </summary>
|
||||
public RawImage webcamDisplay;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the button that is currently used to test the feedback-display
|
||||
/// </summary>
|
||||
public Button feedback;
|
||||
|
||||
/// <summary>
|
||||
/// This is a reference to the PANEL that holds the feedbackwindow
|
||||
/// </summary>
|
||||
public GameObject feedbackPopup;
|
||||
|
||||
/// <summary>
|
||||
/// This is a reference to the textfield that holds the part of the feedback-window that will change: bad/good/excellent
|
||||
/// </summary>
|
||||
public TMP_Text dynamic;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to instructional video player
|
||||
@@ -19,22 +47,21 @@ public class StartPause : MonoBehaviour
|
||||
/// Reference to pause button
|
||||
/// </summary>
|
||||
public Button button;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Reference to sprite for the pause button
|
||||
/// </summary>
|
||||
public Sprite pauseSprite;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the image for displaying the current words sprite
|
||||
/// </summary>
|
||||
public Image wordImage;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the text object for displaying the current word
|
||||
/// </summary>
|
||||
public TextMeshProUGUI title;
|
||||
|
||||
public TMP_Text title;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to user list to get current user
|
||||
@@ -45,29 +72,27 @@ public class StartPause : MonoBehaviour
|
||||
/// The current user
|
||||
/// </summary>
|
||||
private User user;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Current user progress for this course
|
||||
/// </summary>
|
||||
private Progress progress = null;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ScriptableObject with list of all courses
|
||||
/// </summary>
|
||||
public CourseList courselist;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Reference to Course ScriptableObject
|
||||
/// </summary>
|
||||
private Course course;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Index of the current word/letter in the course.learnables list
|
||||
/// </summary>
|
||||
private int currentWordIndex = 0;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// This holds the amount of words in the course
|
||||
/// </summary>
|
||||
@@ -89,11 +114,6 @@ public class StartPause : MonoBehaviour
|
||||
/// </summary>
|
||||
public Button CoursesButton;
|
||||
|
||||
/// <summary>
|
||||
/// Webcam class to close the webcam when the course is finished
|
||||
/// </summary>
|
||||
public Webcam Webcam;
|
||||
|
||||
/// <summary>
|
||||
/// DateTime containint the start moment
|
||||
/// </summary>
|
||||
@@ -102,16 +122,28 @@ public class StartPause : MonoBehaviour
|
||||
/// <summary>
|
||||
/// Reference to the timeSpent UI
|
||||
/// </summary>
|
||||
public TextMeshProUGUI timeSpent;
|
||||
public TMP_Text timeSpent;
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
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
|
||||
/// <summary>
|
||||
/// 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
|
||||
/// <summary>
|
||||
/// This function is called when the next-sign button is pressed.
|
||||
/// It increased the wordindex and fetches new videos/images if index<max, because then the coure is not fincished yet.
|
||||
@@ -222,7 +252,6 @@ public class StartPause : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// finishcourse is called to save the "finished" progress to the user.
|
||||
/// </summary>
|
||||
@@ -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<float>("courseProgress", 1f);
|
||||
userList.Save();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// So long as there are cameras to use, you swap the camera you are using to another in the list.
|
||||
/// </summary>
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The normal sceneChanger cannot be used here since the camera also needs to be stopped.
|
||||
/// This extra functionality is implemented in this function
|
||||
/// </summary>
|
||||
/// <param name="sceneName"> The path for the scene you want to travel to, assuming root-directory is Assets</param>
|
||||
public void Back()
|
||||
{
|
||||
webcamDisplay.texture = null;
|
||||
tex.Stop();
|
||||
tex = null;
|
||||
|
||||
SystemController.GetInstance().BackToPreviousScene();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ae746f332e314e84c9df74b892c75d4d
|
||||
guid: 6b3f784c065813a4a8364b1299284816
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
@@ -1,128 +0,0 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
public class Webcam : MonoBehaviour
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Index to indicate which camera is being used
|
||||
/// </summary>
|
||||
int camdex = 0;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// This texture is used as an intermidiary between the camera output and the display image
|
||||
/// </summary>
|
||||
WebCamTexture tex;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the RawImage that will display the video
|
||||
/// </summary>
|
||||
public RawImage display;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the button that is currently used to test the feedback-display
|
||||
/// </summary>
|
||||
public Button feedback;
|
||||
|
||||
/// <summary>
|
||||
/// This is a reference to the PANEL that holds the feedbackwindow
|
||||
/// </summary>
|
||||
public GameObject popup;
|
||||
|
||||
/// <summary>
|
||||
/// This is a reference to the textfield that holds the part of the feedback-window that will change: bad/good/excellent
|
||||
/// </summary>
|
||||
public TextMeshProUGUI dynamic;
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// So long as there are cameras to use, you swap the camera you are using to another in the list.
|
||||
/// </summary>
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The normal sceneChanger cannot be used here since the camera also needs to be stopped.
|
||||
/// This extra functionality is implemented in this function
|
||||
/// </summary>
|
||||
/// <param name="sceneName"> The path for the scene you want to travel to, assuming root-directory is Assets</param>
|
||||
public void LoadScene(string sceneName)
|
||||
{
|
||||
display.texture = null;
|
||||
tex.Stop();
|
||||
tex = null;
|
||||
|
||||
SceneManager.LoadScene(sceneName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a85f8bd9399680347b4be72850a56fcf
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
/// <summary>
|
||||
/// Class to manage all webcam stuff inside the SpellingBee minigame
|
||||
/// </summary>
|
||||
public class SpellingBeeWebcam : MonoBehaviour
|
||||
{
|
||||
{
|
||||
/// <summary>
|
||||
/// Index of the current camera
|
||||
/// </summary>
|
||||
@@ -21,12 +22,7 @@ public class SpellingBeeWebcam : MonoBehaviour
|
||||
public RawImage display;
|
||||
|
||||
/// <summary>
|
||||
/// For later use
|
||||
/// </summary>
|
||||
public TextMeshProUGUI dynamic;
|
||||
|
||||
/// <summary>
|
||||
/// Initialize the camera view
|
||||
/// Setup the webcam correctly
|
||||
/// </summary>
|
||||
void Awake()
|
||||
{
|
||||
@@ -38,7 +34,7 @@ public class SpellingBeeWebcam : MonoBehaviour
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Switch to a different webcam
|
||||
/// Swap webcam by cycling through the `WebCamTexture.devices` list
|
||||
/// </summary>
|
||||
public void SwapCam()
|
||||
{
|
||||
@@ -65,12 +61,12 @@ public class SpellingBeeWebcam : MonoBehaviour
|
||||
/// <summary>
|
||||
/// Scene changing is implemented here to avoid problems with webcam
|
||||
/// </summary>
|
||||
public void LoadScene(string sceneName)
|
||||
public void GotoThemeSelection()
|
||||
{
|
||||
display.texture = null;
|
||||
tex.Stop();
|
||||
tex = null;
|
||||
|
||||
SceneManager.LoadScene(sceneName);
|
||||
SystemController.GetInstance().BackToPreviousScene();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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]}]}]}]}
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 29594155802425940b4fd7351ad447e8
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user