Resolve WES-97 "Integrate signpredictor in spellingbee"

This commit is contained in:
Dries Van Schuylenbergh
2023-03-19 17:37:50 +00:00
committed by Lukas Van Rossem
parent f827c29d3a
commit 3abc24a39c
72 changed files with 3169 additions and 1886 deletions

View File

@@ -1719,7 +1719,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Deze gebruiker kan niet verwijderd worden.
m_text: Er moet minstens 1 gebruiker zijn.
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}

View File

@@ -1366,7 +1366,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 300}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!114 &1070872527
MonoBehaviour:
@@ -1381,7 +1381,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_HorizontalFit: 2
m_VerticalFit: 0
m_VerticalFit: 1
--- !u!114 &1070872528
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -1606,7 +1606,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 300}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!114 &1338988555
MonoBehaviour:
@@ -1621,7 +1621,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_HorizontalFit: 2
m_VerticalFit: 0
m_VerticalFit: 1
--- !u!114 &1338988556
MonoBehaviour:
m_ObjectHideFlags: 0

View File

@@ -53,7 +53,9 @@ public class MinigameProgressCard : MonoBehaviour
thumbnail.sprite = minigame.thumbnail;
title.text = minigame.title;
highscore.text = $"Topscore: {minigameProgress.Get<List<Score>>("highestScores")[0].scoreValue}";
List<Score> highscores = minigameProgress.Get<List<Score>>("highestScores");
int score = highscores.Count > 0 ? highscores[0].scoreValue : 0;
highscore.text = $"Topscore: {score}";
button.onClick.AddListener(selectActivity);
}
}

View File

@@ -77,7 +77,6 @@ public class User
recommenedCourses.Add(Tuple.Create<CourseIndex, float>(idx, progress));
}
}
return recommenedCourses.Take(3).ToList();
}

View File

@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Video;
/// <summary>
/// Class for holding all (static) data about a certain course
@@ -10,7 +6,7 @@ using UnityEngine.Video;
[CreateAssetMenu(menuName = "Create new Scriptable/Course")]
public class Course : ScriptableObject
{
/// <summary>
/// Index of the course
/// </summary>

View File

@@ -27,15 +27,6 @@ public class CourseList : ScriptableObject
return courses.Find((c) => c.index == courseIndex);
}
/// <summary>
/// Function to find a minigame-index in the list based on its title
/// </summary>
/// <param name="title"></param>
public void SetCurrentCourse(string title)
{
this.currentCourseIndex = courses.FindIndex((mi) => mi.title == title);
}
/// <summary>
/// Function to find a minigame-index in the list based on its index
/// </summary>

View File

@@ -1,3 +1,16 @@
{
"name": "InterfacesScripts"
}
"name": "InterfacesScripts",
"rootNamespace": "",
"references": [
"GUID:5c2b5ba89f9e74e418232e154bc5cc7a"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

@@ -28,21 +28,12 @@ public class MinigameList : ScriptableObject
return minigames.Find((m) => m.index == minigameIndex);
}
/// <summary>
/// Function to find a minigame-index in the list based on its title
/// </summary>
/// <param name="title"></param>
public void SetCurrentMinigame(string title)
{
this.currentMinigameIndex = minigames.FindIndex((mi) => mi.title == title);
}
/// <summary>
/// Function to find a minigame-index in the list based on its index
/// </summary>
/// <param name="title"></param>
public void SetCurrentMinigame(MinigameIndex index)
{
this.currentMinigameIndex = minigames.FindIndex((mi) => mi.index == index);
currentMinigameIndex = minigames.FindIndex((mi) => mi.index == index);
}
}

View File

@@ -1,5 +1,5 @@
using System.Collections;
using System.Collections.Generic;
using Unity.Barracuda;
using UnityEngine;
/// <summary>
@@ -23,6 +23,11 @@ public class Theme : ScriptableObject
/// </summary>
public ThemeIndex index;
/// <summary>
/// Reference to the model used in the SignPredictor
/// </summary>
public NNModel model;
/// <summary>
/// List of all learnable words/letters
/// </summary>

View File

@@ -4,21 +4,21 @@
/// </summary>
public enum ThemeIndex
{
ALPHABET,
CLOTHING,
ANIMALS,
FOOD,
HOBBIES,
HOUSE,
FAMILY,
SPELLINGGEOGRAPY,
SPELLINGBUILDINGS,
SPELLINGSPORTS,
SPELLINGBASICS,
SPELLINGHOBBIES,
SPELLINGPEOPLE,
SPELLINGFRUIT,
SPELLINGVEGGIES,
SPELLINGWILD,
SPELLINGFARM
SIGN_ALPHABET,
SIGN_CLOTHING,
SIGN_ANIMALS,
SIGN_FOOD,
SIGN_HOBBIES,
SIGN_HOUSE,
SIGN_FAMILY,
SPELLING_GEOGRAPY,
SPELLING_BUILDINGS,
SPELLING_SPORTS,
SPELLING_BASICS,
SPELLING_HOBBIES,
SPELLING_PEOPLE,
SPELLING_FRUIT,
SPELLING_VEGGIES,
SPELLING_WILD,
SPELLING_FARM
}

View File

@@ -1,4 +1,3 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
@@ -19,15 +18,6 @@ public class ThemeList : ScriptableObject
/// </summary>
public List<Theme> themes = new List<Theme>();
/// <summary>
/// Function to find a theme-index in the list based on its title
/// </summary>
/// <param name="title"></param>
public void SetCurrentTheme(string title)
{
this.currentThemeIndex = themes.FindIndex((mi) => mi.title == title);
}
/// <summary>
/// Function to find a theme-index in the list based on its index
/// </summary>

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 7992d1284c7de4b089f4155b3e4ada83
guid: e2a50218afbf0464cb9a1e3db6fc39b1
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 02f0f7ef62cb5954397325e5092cf71f
guid: 4cb41cbb2c98d3b44a131ac69a123e9f
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 28a987a6147f32d43b5fd21a33ad4d10
guid: fb8b51022bdcd654a9f29c054832a1b5
TextScriptImporter:
externalObjects: {}
userData:

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: e564aa8a2b88d944dae4dc81653a5663
guid: 2594d8a9acfef6c4b88ce2618c4169cb
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a08fc4c667eb4434f8b3405907070b2c
guid: e6d85df707405ad4f97c23b07227ee99
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}

View File

@@ -11,7 +11,7 @@ GameObject:
- component: {fileID: 4959898007472841755}
- component: {fileID: 4959898007472841754}
m_Layer: 5
m_Name: Progress
m_Name: Slider
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@@ -24,21 +24,21 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4959898007472841756}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
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: 4959898007929492911}
- {fileID: 4959898007984173683}
m_Father: {fileID: 4959898007614330356}
m_RootOrder: 3
m_Father: {fileID: 1417749870311553741}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0}
m_SizeDelta: {x: -20, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &4959898007472841754
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -123,9 +123,8 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 4959898009379617329}
- {fileID: 4959898009362012416}
- {fileID: 5378512836556066408}
- {fileID: 4959898007472841755}
- {fileID: 2813955202388678150}
- {fileID: 1417749870311553741}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -437,7 +436,7 @@ GameObject:
- component: {fileID: 4959898009362012446}
- component: {fileID: 4959898009362012447}
m_Layer: 5
m_Name: Title
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@@ -450,19 +449,19 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4959898009362012417}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
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: 4959898007614330356}
m_RootOrder: 1
m_Father: {fileID: 2813955202388678150}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: -5}
m_SizeDelta: {x: 246, y: 64}
m_Pivot: {x: 0.5, y: 1}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4959898009362012446
CanvasRenderer:
m_ObjectHideFlags: 0
@@ -636,6 +635,83 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &5811962218190726816
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2813955202388678150}
- component: {fileID: 7918167783998757471}
- component: {fileID: 8870268606043288143}
m_Layer: 5
m_Name: Title
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2813955202388678150
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5811962218190726816}
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: 4959898009362012416}
m_Father: {fileID: 4959898007614330356}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -10}
m_SizeDelta: {x: -20, y: 64}
m_Pivot: {x: 0.5, y: 1}
--- !u!222 &7918167783998757471
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5811962218190726816}
m_CullTransparentMesh: 1
--- !u!114 &8870268606043288143
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5811962218190726816}
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: 1, g: 1, b: 1, a: 0.5019608}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &8032316393302770855
GameObject:
m_ObjectHideFlags: 0
@@ -661,18 +737,18 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8032316393302770855}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
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: 4959898007614330356}
m_RootOrder: 2
m_Father: {fileID: 1417749870311553741}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 200, y: 50}
m_SizeDelta: {x: 0, y: 50}
m_Pivot: {x: 0.5, y: 0}
--- !u!222 &664234899589649762
CanvasRenderer:
@@ -711,7 +787,7 @@ MonoBehaviour:
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4281479730
rgba: 4294950912
m_fontColor: {r: 0, g: 0.7529412, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
@@ -771,3 +847,81 @@ MonoBehaviour:
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &8124493043442100213
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1417749870311553741}
- component: {fileID: 6308727626875428689}
- component: {fileID: 8474656946490788667}
m_Layer: 5
m_Name: Progress
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1417749870311553741
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8124493043442100213}
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: 5378512836556066408}
- {fileID: 4959898007472841755}
m_Father: {fileID: 4959898007614330356}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 0, y: 10}
m_SizeDelta: {x: -20, y: 50}
m_Pivot: {x: 0.5, y: 0}
--- !u!222 &6308727626875428689
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8124493043442100213}
m_CullTransparentMesh: 1
--- !u!114 &8474656946490788667
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8124493043442100213}
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: 1, g: 1, b: 1, a: 0.5019608}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1

View File

@@ -33,7 +33,7 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 4959898009379617329}
- {fileID: 4959898009362012416}
- {fileID: 4484781637876518546}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -153,7 +153,7 @@ GameObject:
- component: {fileID: 4959898009362012446}
- component: {fileID: 4959898009362012447}
m_Layer: 5
m_Name: Title
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@@ -166,19 +166,19 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4959898009362012417}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
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: 4959898007614330356}
m_RootOrder: 1
m_Father: {fileID: 4484781637876518546}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: -5}
m_SizeDelta: {x: 246, y: 64}
m_Pivot: {x: 0.5, y: 1}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4959898009362012446
CanvasRenderer:
m_ObjectHideFlags: 0
@@ -352,3 +352,80 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &6222436643885153819
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4484781637876518546}
- component: {fileID: 7404719235506382604}
- component: {fileID: 8835811406701149686}
m_Layer: 5
m_Name: Title
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4484781637876518546
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6222436643885153819}
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: 4959898009362012416}
m_Father: {fileID: 4959898007614330356}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -10}
m_SizeDelta: {x: -20, y: 64}
m_Pivot: {x: 0.5, y: 1}
--- !u!222 &7404719235506382604
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6222436643885153819}
m_CullTransparentMesh: 1
--- !u!114 &8835811406701149686
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6222436643885153819}
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: 1, g: 1, b: 1, a: 0.5019608}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1

View File

@@ -145,6 +145,7 @@ GameObject:
m_Component:
- component: {fileID: 381012861935775044}
- component: {fileID: 381012861935775046}
- component: {fileID: 7552489734381383733}
m_Layer: 5
m_Name: UserInfoHS
m_TagString: Untagged
@@ -170,10 +171,10 @@ RectTransform:
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_SizeDelta: {x: 400, y: 120}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &381012861935775046
CanvasRenderer:
@@ -183,6 +184,36 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 381012861935775045}
m_CullTransparentMesh: 1
--- !u!114 &7552489734381383733
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 381012861935775045}
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, 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_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &381012862209399488
GameObject:
m_ObjectHideFlags: 0

File diff suppressed because it is too large Load Diff

View File

@@ -984,17 +984,17 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 906197780}
m_TargetAssemblyTypeName: CourseScreenHandler, Assembly-CSharp
m_MethodName: LoadScene
m_Mode: 5
m_TargetAssemblyTypeName: CourseMenuScreen, CommonScripts
m_MethodName: GotoListOfCourses
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument: Common/Scenes/ListCoursesScreen
m_StringArgument:
m_BoolArgument: 0
m_CallState: 1
m_CallState: 2
--- !u!114 &1709971557
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -1204,6 +1204,26 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 906197777}
m_Modifications:
- target: {fileID: 1769699556132214506, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1769699556132214506, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1769699556132214506, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1769699556132214506, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1769699556132214506, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1935285004959629519, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_SizeDelta.y
value: 0

View File

@@ -198,6 +198,30 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 906197777}
m_Modifications:
- target: {fileID: 1769699556132214506, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1769699556132214506, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1769699556132214506, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1769699556132214506, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1769699556132214506, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- 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 +314,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 &289602555 stripped
@@ -923,6 +967,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 0fac0bf527487ad48835aff400b1f762, type: 3}
m_Name:
m_EditorClassIdentifier:
userList: {fileID: 11400000, guid: 072bec636a40f7e4e93b0ac624a3bda2, type: 2}
courseContainer: {fileID: 461792789}
courseItemPrefab: {fileID: 4959898007614330357, guid: baf585123c6364d40a17b89676eb350d, type: 3}
courseList: {fileID: 11400000, guid: a7ab583094b7897468bbca9243717608, type: 2}

View File

@@ -375,11 +375,11 @@ RectTransform:
m_Father: {fileID: 906197777}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -600.7103, y: -100}
m_SizeDelta: {x: 404.5794, y: 82.9468}
m_Pivot: {x: 0.5, y: 0.5}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5}
m_AnchoredPosition: {x: 150, y: -100}
m_SizeDelta: {x: 400, y: 64}
m_Pivot: {x: 0, y: 0.5}
--- !u!114 &507029408
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -618,11 +618,11 @@ RectTransform:
m_Father: {fileID: 906197777}
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}
m_AnchoredPosition: {x: -603, y: 175}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5}
m_AnchoredPosition: {x: 150, y: 150}
m_SizeDelta: {x: 400, y: 400}
m_Pivot: {x: 0.5, y: 0.5}
m_Pivot: {x: 0, y: 0.5}
--- !u!114 &755030131
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -802,8 +802,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 243.67188, y: -100}
m_SizeDelta: {x: 987.3438, y: 400}
m_AnchoredPosition: {x: 250, y: -100}
m_SizeDelta: {x: 1000, y: 400}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &915818721
MonoBehaviour:
@@ -930,7 +930,7 @@ RectTransform:
m_GameObject: {fileID: 955994877}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.085, y: 0.085, z: 0.85}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 1
m_Children:
- {fileID: 1966196597}
@@ -938,11 +938,11 @@ RectTransform:
m_Father: {fileID: 906197777}
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}
m_AnchoredPosition: {x: 660, y: -405}
m_SizeDelta: {x: 6434.104, y: 1862.9999}
m_Pivot: {x: 0.5, y: 0.5}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: -20, y: 20}
m_SizeDelta: {x: 500, y: 145}
m_Pivot: {x: 1, y: 0}
--- !u!114 &955994879
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -1052,17 +1052,17 @@ RectTransform:
m_GameObject: {fileID: 991775367}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 2.2, y: 2.2, z: 2.2}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 1
m_Children: []
m_Father: {fileID: 955994878}
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}
m_AnchoredPosition: {x: -2288, y: 8}
m_SizeDelta: {x: 512, y: 512}
m_Pivot: {x: 0.5, y: 0.5}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5}
m_AnchoredPosition: {x: 20, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0, y: 0.5}
--- !u!114 &991775369
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -1134,11 +1134,11 @@ RectTransform:
m_Father: {fileID: 906197777}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 450}
m_SizeDelta: {x: 890, y: 150}
m_Pivot: {x: 0.5, y: 0.5}
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: -20}
m_SizeDelta: {x: 900, y: 150}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &1168097236
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -1478,8 +1478,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 700, y: 0}
m_SizeDelta: {x: -1800, y: -640}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1966196598
MonoBehaviour:
@@ -1528,8 +1528,8 @@ MonoBehaviour:
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 1000
m_fontSizeBase: 1000
m_fontSize: 80
m_fontSizeBase: 80
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
@@ -1564,7 +1564,7 @@ MonoBehaviour:
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_margin: {x: 150.5354, y: 26.162018, z: 37.023926, w: 27.4693}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
@@ -1613,8 +1613,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 243.67188, y: 200}
m_SizeDelta: {x: 987.3438, y: 180}
m_AnchoredPosition: {x: 250, y: 200}
m_SizeDelta: {x: 1000, y: 200}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1990031300
MonoBehaviour:

View File

@@ -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 &519420028
GameObject:
@@ -459,50 +459,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 906197776}
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 &1768150802
GameObject:
m_ObjectHideFlags: 0
@@ -597,7 +553,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}
@@ -611,6 +567,30 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 906197777}
m_Modifications:
- target: {fileID: 1769699556132214506, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1769699556132214506, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1769699556132214506, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1769699556132214506, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1769699556132214506, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- 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
@@ -703,6 +683,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 &2035873552 stripped

View File

@@ -15,6 +15,7 @@ MonoBehaviour:
title: Dieren
description: Van vis tot leeuw
index: 2
model: {fileID: 0}
learnables:
- name: Walvis
image: {fileID: 21300000, guid: 2b01165a5836ab14593d7a5862bd6793, type: 3}

View File

@@ -14,6 +14,8 @@ MonoBehaviour:
m_EditorClassIdentifier:
title: Handalfabet
description: Van A tot Z
index: 0
model: {fileID: 5022602860645237092, guid: 2594d8a9acfef6c4b88ce2618c4169cb, type: 3}
learnables:
- name: A
image: {fileID: 21300000, guid: 4eb4ef55f866f114dafb722f4bd05c76, type: 3}

View File

@@ -15,6 +15,7 @@ MonoBehaviour:
title: Basics
description: Van welkom tot stop
index: 10
model: {fileID: 5022602860645237092, guid: 2594d8a9acfef6c4b88ce2618c4169cb, type: 3}
learnables:
- name: Hallo
image: {fileID: 21300000, guid: f2a020e24bfa24842bccecf6b36d5b79, type: 3}

View File

@@ -15,6 +15,7 @@ MonoBehaviour:
title: In de Stad
description: Van park tot zwembad
index: 8
model: {fileID: 5022602860645237092, guid: 2594d8a9acfef6c4b88ce2618c4169cb, type: 3}
learnables:
- name: Park
image: {fileID: 21300000, guid: 8ea62bbfad596234c9f6ba49c41b3b08, type: 3}

View File

@@ -15,6 +15,7 @@ MonoBehaviour:
title: Boerderijdieren
description: Van konijn tot kip
index: 16
model: {fileID: 5022602860645237092, guid: 2594d8a9acfef6c4b88ce2618c4169cb, type: 3}
learnables:
- name: kat
image: {fileID: 21300000, guid: 73f4e028d9efb644aa23538a749667c5, type: 3}

View File

@@ -15,6 +15,7 @@ MonoBehaviour:
title: Fruit
description: Van aardbei tot kers
index: 13
model: {fileID: 5022602860645237092, guid: 2594d8a9acfef6c4b88ce2618c4169cb, type: 3}
learnables:
- name: Aardbei
image: {fileID: 21300000, guid: 1a28fa2c46acbb1408633e4e98061d56, type: 3}

View File

@@ -15,6 +15,7 @@ MonoBehaviour:
title: Geografie
description: Van hier tot China
index: 7
model: {fileID: 5022602860645237092, guid: 2594d8a9acfef6c4b88ce2618c4169cb, type: 3}
learnables:
- name: China
image: {fileID: 21300000, guid: a5c1efdb79dcfb54aaf2723f4b4842be, type: 3}
@@ -40,7 +41,7 @@ MonoBehaviour:
- name: Finland
image: {fileID: 21300000, guid: 263ab0c625efd97458380f4460cc224e, type: 3}
clip: {fileID: 0}
- name: Fankrijk
- name: Frankrijk
image: {fileID: 21300000, guid: 787bf66fabd593c4fa2f97246cd796c9, type: 3}
clip: {fileID: 0}
- name: Griekenland

View File

@@ -15,6 +15,7 @@ MonoBehaviour:
title: Hobbies
description: Van sport tot muziek
index: 11
model: {fileID: 5022602860645237092, guid: 2594d8a9acfef6c4b88ce2618c4169cb, type: 3}
learnables:
- name: Dansen
image: {fileID: 21300000, guid: 6d405f607ae817744b49f921f0611088, type: 3}

View File

@@ -15,6 +15,7 @@ MonoBehaviour:
title: Mensen
description: Van vrienden tot familie
index: 12
model: {fileID: 5022602860645237092, guid: 2594d8a9acfef6c4b88ce2618c4169cb, type: 3}
learnables:
- name: Broer
image: {fileID: 21300000, guid: daebe503f7767b64683d8eeab617e8bc, type: 3}

View File

@@ -15,6 +15,7 @@ MonoBehaviour:
title: Sporten
description: Van atletiek tot zeilen
index: 9
model: {fileID: 5022602860645237092, guid: 2594d8a9acfef6c4b88ce2618c4169cb, type: 3}
learnables:
- name: Atletiek
image: {fileID: 21300000, guid: 25a05f23961d2b443972f4aa3c2bec29, type: 3}

View File

@@ -15,6 +15,7 @@ MonoBehaviour:
title: Groenten
description: Van erwt tot komkommer
index: 14
model: {fileID: 5022602860645237092, guid: 2594d8a9acfef6c4b88ce2618c4169cb, type: 3}
learnables:
- name: Aardappel
image: {fileID: 21300000, guid: 2610cdbc24a125f43ada7fed67d8f51b, type: 3}

View File

@@ -15,6 +15,7 @@ MonoBehaviour:
title: Dieren in het wild
description: Van Leeuw tot olifant
index: 15
model: {fileID: 5022602860645237092, guid: 2594d8a9acfef6c4b88ce2618c4169cb, type: 3}
learnables:
- name: Vos
image: {fileID: 21300000, guid: 9d5771baa6ea6e041b066135d6798e1c, type: 3}

View File

@@ -5,6 +5,7 @@
"GUID:6055be8ebefd69e48b49212b09b47b2f",
"GUID:63c63e721f65ebb7d871cb9ef49f4752",
"GUID:1631ed2680c61245b8211d943c1639a8",
"GUID:5c2b5ba89f9e74e418232e154bc5cc7a",
"GUID:7f2d0ee6dd21e1d4eb25b71b7a749d25"
],
"includePlatforms": [],

View File

@@ -7,11 +7,15 @@ using UnityEngine.UI;
/// </summary>
public class CourseActivityScreen : MonoBehaviour
{
// vvv TEMPORARY STUFF vvv
public GameObject playButton;
public GameObject previewButton;
// ^^^ TEMPORARY STUFF ^^^
/// <summary>
/// Reference to the courses
/// </summary>
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>
/// Reference to the users
@@ -51,6 +55,11 @@ public class CourseActivityScreen : MonoBehaviour
int index = courseList.currentCourseIndex;
Course course = courseList.courses[index];
// vvv TEMPORARY STUFF vvv
playButton.SetActive(course.theme.model != null);
previewButton.SetActive(course.theme.model == null);
// ^^^ TEMPORARY STUFF ^^^
title.text = course.title;
description.text = course.description;
courseImage.sprite = course.thumbnail;

View File

@@ -5,6 +5,11 @@ using UnityEngine;
/// </summary>
public class ListCoursesScreen : MonoBehaviour
{
/// <summary>
/// Reference to the userlist
/// </summary>
public UserList userList;
/// <summary>
/// Reference to the course-list container object
/// </summary>
@@ -25,6 +30,8 @@ public class ListCoursesScreen : MonoBehaviour
/// </summary>
void Start()
{
User user = userList.GetCurrentUser();
foreach (Course course in courseList.courses)
{
// Create instance of prefab
@@ -33,6 +40,9 @@ public class ListCoursesScreen : MonoBehaviour
// Dynamically load appearance
CourseItem item = instance.GetComponent<CourseItem>();
item.course = course;
Progress progress = user.GetCourseProgress(course.index);
item.progress = progress != null ? progress.Get<float>("courseProgress") : 0.0f;
}
}

View File

@@ -53,7 +53,7 @@ public class MinigameItem : MonoBehaviour
// Add click functionality
button.onClick.AddListener(() =>
{
minigameList.SetCurrentMinigame(minigame.title);
minigameList.SetCurrentMinigame(minigame.index);
SystemController.GetInstance().LoadNextScene("Common/Scenes/MinigameActivityScreen");
});
}

View File

@@ -431,6 +431,7 @@ RectTransform:
- {fileID: 1813638489}
- {fileID: 1335886460}
- {fileID: 1714882682}
- {fileID: 2070775954}
m_Father: {fileID: 1559094126}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -489,9 +490,9 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 6b3f784c065813a4a8364b1299284816, type: 3}
m_Name:
m_EditorClassIdentifier:
webcamDisplay: {fileID: 378145456}
feedback: {fileID: 0}
dynamic: {fileID: 0}
previewModel: {fileID: 5022602860645237092, guid: 2594d8a9acfef6c4b88ce2618c4169cb, type: 3}
feedbackProgressBar: {fileID: 4318122121437849759}
previewMessage: {fileID: 2070775951}
player: {fileID: 993952931}
button: {fileID: 1159630774}
pauseSprite: {fileID: 21300000, guid: 43db869a07cf51f45a411b6e4a417743, type: 3}
@@ -502,6 +503,7 @@ MonoBehaviour:
ResultPanel: {fileID: 1383144366}
CoursesButton: {fileID: 839294691}
timeSpent: {fileID: 77614869}
feedback: {fileID: 1714882683}
--- !u!1 &361280475
GameObject:
m_ObjectHideFlags: 0
@@ -813,11 +815,11 @@ RectTransform:
m_Father: {fileID: 1559094126}
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}
m_AnchoredPosition: {x: 165.79944, y: 476}
m_SizeDelta: {x: 1287.0682, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: -25}
m_SizeDelta: {x: 1200, y: 100}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &388014849
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -838,9 +840,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: 'Filler
'
m_text: Title
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
@@ -867,13 +867,13 @@ MonoBehaviour:
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 36
m_fontSizeBase: 36
m_fontSize: 64
m_fontSizeBase: 64
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_fontStyle: 1
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
m_textAlignment: 65535
@@ -1280,7 +1280,6 @@ GameObject:
m_Component:
- component: {fileID: 883853269}
- component: {fileID: 883853268}
- component: {fileID: 883853270}
m_Layer: 0
m_Name: SignPredictorController
m_TagString: Untagged
@@ -1300,8 +1299,10 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 043ccd99cf82b3cc9bf2e00956ce2b93, type: 3}
m_Name:
m_EditorClassIdentifier:
_configAsset: {fileID: 4900000, guid: 6288c43cdca97374782dac1ea87aa029, type: 3}
_screen: {fileID: 378145456}
model: {fileID: 0}
modelInfoFile: {fileID: 4900000, guid: fb8b51022bdcd654a9f29c054832a1b5, type: 3}
configAsset: {fileID: 4900000, guid: 6288c43cdca97374782dac1ea87aa029, type: 3}
screen: {fileID: 378145456}
--- !u!4 &883853269
Transform:
m_ObjectHideFlags: 0
@@ -1310,29 +1311,13 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 883853267}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 933.36176, y: 451.70044, z: 2459.944}
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!114 &883853270
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 883853267}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 44e682a32ee15cc489bf50f3a06f717b, type: 3}
m_Name:
m_EditorClassIdentifier:
feedback: {fileID: 1236095910}
signPredictor: {fileID: 883853268}
templateCourse: {fileID: 301088551}
progress: {fileID: 1553869409}
--- !u!1 &892938733
GameObject:
m_ObjectHideFlags: 0
@@ -1540,98 +1525,6 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1098212287
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1098212288}
- component: {fileID: 1098212291}
- component: {fileID: 1098212290}
- component: {fileID: 1098212289}
m_Layer: 5
m_Name: Background
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1098212288
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1098212287}
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: 1553869410}
m_Father: {fileID: 1714882682}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 45.2751, y: -388.6199}
m_SizeDelta: {x: -1478.8741, y: -1023.5154}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1098212289
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1098212287}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3312d7739989d2b4e91e6319e9a96d76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding: {x: 0, y: 0, z: 0, w: 0}
m_Softness: {x: 20, y: 20}
--- !u!114 &1098212290
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1098212287}
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: 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_Sprite: {fileID: 10907, 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 &1098212291
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1098212287}
m_CullTransparentMesh: 1
--- !u!1 &1159630772
GameObject:
m_ObjectHideFlags: 0
@@ -1765,141 +1658,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1159630772}
m_CullTransparentMesh: 0
--- !u!1 &1236095909
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1236095912}
- component: {fileID: 1236095911}
- component: {fileID: 1236095910}
m_Layer: 5
m_Name: Feedback
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1236095910
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1236095909}
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: Detecteren ...
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: 4282188031
m_fontColor: {r: 1, g: 0, b: 0.23945475, 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: 46.6
m_fontSizeBase: 46.6
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 1
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 &1236095911
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1236095909}
m_CullTransparentMesh: 1
--- !u!224 &1236095912
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1236095909}
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: 1714882682}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 32.079, y: -316.18}
m_SizeDelta: {x: 414.73, y: 88.393}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &1300721216
GameObject:
m_ObjectHideFlags: 0
@@ -1983,18 +1741,6 @@ PrefabInstance:
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
@@ -2395,82 +2141,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1493108462}
m_CullTransparentMesh: 1
--- !u!1 &1553869409
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1553869410}
- component: {fileID: 1553869412}
- component: {fileID: 1553869411}
m_Layer: 5
m_Name: Progress
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1553869410
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1553869409}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1098212288}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0.00018310547, y: 0}
m_SizeDelta: {x: 438.64996, y: 0}
m_Pivot: {x: -0.000000013038516, y: 0.5}
--- !u!114 &1553869411
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1553869409}
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.4117647, g: 1, b: 0, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10907, 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 &1553869412
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1553869409}
m_CullTransparentMesh: 1
--- !u!1 &1559094122
GameObject:
m_ObjectHideFlags: 0
@@ -2574,84 +2244,22 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!1 &1714882681
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1714882682}
- component: {fileID: 1714882684}
- component: {fileID: 1714882683}
m_Layer: 5
m_Name: FeedbackPanel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1714882682
--- !u!224 &1714882682 stripped
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_CorrespondingSourceObject: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
m_PrefabInstance: {fileID: 4318122121437849758}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1714882681}
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: 1236095912}
- {fileID: 1098212288}
m_Father: {fileID: 301088548}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1714882683
--- !u!114 &1714882683 stripped
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_CorrespondingSourceObject: {fileID: 4318122119930585317, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
m_PrefabInstance: {fileID: 4318122121437849758}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1714882681}
m_Enabled: 0
m_GameObject: {fileID: 4318122121437849759}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Script: {fileID: 11500000, guid: 44e682a32ee15cc489bf50f3a06f717b, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.392}
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: 10907, 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 &1714882684
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1714882681}
m_CullTransparentMesh: 1
--- !u!1 &1773033262
GameObject:
m_ObjectHideFlags: 0
@@ -2921,6 +2529,145 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1813638488}
m_CullTransparentMesh: 1
--- !u!1 &2070775951
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2070775954}
- component: {fileID: 2070775953}
- component: {fileID: 2070775952}
m_Layer: 5
m_Name: TEMPORARY PreviewMessage
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &2070775952
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2070775951}
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: 'DEZE LES IS GESTART IN PREVIEW MODUS
Het is nog niet mogelijk deze
les te spelen via gebaren. Gebruik de ''Gebaar overslaan'' knop om naar het volgende
gebaar te gaan.'
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: 4278190335
m_fontColor: {r: 1, g: 0, b: 0, 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: 36
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 1
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 &2070775953
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2070775951}
m_CullTransparentMesh: 1
--- !u!224 &2070775954
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2070775951}
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: 301088548}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 0}
m_AnchoredPosition: {x: 150, y: 150}
m_SizeDelta: {x: 900, y: 200}
m_Pivot: {x: 0.5, y: 0}
--- !u!1 &2145235735
GameObject:
m_ObjectHideFlags: 0
@@ -2957,7 +2704,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -480, y: -346.49997}
m_SizeDelta: {x: 960, y: 387}
m_SizeDelta: {x: 300, y: 300}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2145235737
MonoBehaviour:
@@ -2997,3 +2744,121 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2145235735}
m_CullTransparentMesh: 1
--- !u!1001 &4318122121437849758
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 301088548}
m_Modifications:
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_Pivot.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_RootOrder
value: 5
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_AnchorMax.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_AnchorMin.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_SizeDelta.x
value: 500
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_SizeDelta.y
value: 150
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_AnchoredPosition.y
value: 200
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585317, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: signPredictor
value:
objectReference: {fileID: 883853268}
- target: {fileID: 4318122119930585319, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_Name
value: Feedback
objectReference: {fileID: 0}
- target: {fileID: 4318122119968934245, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4318122120222767926, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4318122120334233317, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
--- !u!1 &4318122121437849759 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 4318122119930585319, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
m_PrefabInstance: {fileID: 4318122121437849758}
m_PrefabAsset: {fileID: 0}

View File

@@ -12,12 +12,12 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 96fe8874f9754b545ae25fb826312ebc, type: 3}
m_Name: CourseList
m_EditorClassIdentifier:
currentCourseIndex: 0
currentCourseIndex: 2
courses:
- {fileID: 11400000, guid: 300921292bfd5564b8ce70b834c3f334, type: 2}
- {fileID: 11400000, guid: 622bbd43e3debd044b790f1f3f325f35, type: 2}
- {fileID: 11400000, guid: 83209cb7100ccff4ca934d4e322e4864, type: 2}
- {fileID: 11400000, guid: a4c862fb404312b499c146eb0e957820, type: 2}
- {fileID: 11400000, guid: df24513454ae7da44aa0511ea83e7196, type: 2}
- {fileID: 11400000, guid: fd1ef360b467b0943aca7c2b11ed1314, type: 2}
- {fileID: 11400000, guid: 83209cb7100ccff4ca934d4e322e4864, type: 2}
- {fileID: 11400000, guid: 38547b06e92b3f54cb6a992333d41289, type: 2}
- {fileID: 11400000, guid: df24513454ae7da44aa0511ea83e7196, type: 2}

View File

@@ -6,7 +6,7 @@
"AccountsScripts",
"InterfacesScripts",
"SignPredictor",
"Tween"
"Unity.Barracuda"
],
"includePlatforms": [],
"excludePlatforms": [],

View File

@@ -1,123 +0,0 @@
//using Mediapipe.Unity.Tutorial;
using Mediapipe.Unity.Tutorial;
using System.Collections;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
// for your own scripts make sure to add the following line:
using DigitalRuby.Tween;
using UnityEngine.SceneManagement;
namespace Assets.Courses.Scripts
{
public class Feedback : MonoBehaviour
{
/// <summary>
/// Reference to the feedback field
/// </summary>
public TMP_Text feedback;
/// <summary>
/// Reference to the sign predictor
/// </summary>
public Wesign_extractor signPredictor;
/// <summary>
/// Reference to the TemplateCourse
/// </summary>
public TemplateCourse templateCourse;
/// <summary>
/// Reference to the progress bar
/// </summary>
public GameObject progress;
/// <summary>
/// Start is called before the first frame update
/// </summary>
void Start()
{
// Start the coroutine to update the scale every 200 milliseconds
StartCoroutine(UpdateFeedback());
}
/// <summary>
/// UpdateScale updates the progress bar every 200ms, updated the feedback text, and progress bar color
/// If a high enough accuracy is detected, it will go to the next sign
/// </summary>
/// <returns></returns>
IEnumerator UpdateFeedback()
{
while (true)
{
// Get current sign
char currentSign = (char)(65 + templateCourse.GetWordIndex());
//Debug.Log(currentSign);
// Get the predicted sign
if (signPredictor != null && signPredictor.letterProbabilities != null && signPredictor.letterProbabilities.ContainsKey(currentSign))
{
int accuracy = (int)(signPredictor.letterProbabilities[currentSign] * 100);
if (accuracy > 98)
{
feedback.text = "Perfect!!!";
feedback.color = Color.green;
progress.GetComponent<Image>().color = Color.green;
}
else if (accuracy > 95)
{
feedback.text = "Super!";
feedback.color = Color.green;
progress.GetComponent<Image>().color = Color.green;
}
else if (accuracy > 90)
{
feedback.text = "Goed";
feedback.color = Color.green;
progress.GetComponent<Image>().color = Color.green;
}
else if (accuracy > 80)
{
feedback.text = "Bijna...";
feedback.color = new Color(0xFF, 0xE5, 0x00);
progress.GetComponent<Image>().color = new Color(0xFF, 0xE5, 0x00);
}
else
{
feedback.text = "Detecteren ...";
feedback.color = Color.red;
progress.GetComponent<Image>().color = Color.red;
}
// use an exponential scale
float newScale = Mathf.Exp(((float)accuracy / 24.5f) - 4);
Vector3 newScaleVector = new Vector3(newScale,
progress.transform.localScale.y,
progress.transform.localScale.z);
System.Action<ITween<Vector3>> updateProgressScale = (t) =>
{
if (progress != null)
{
progress.transform.localScale = t.CurrentValue;
}
};
progress.Tween("ScaleProgress", progress.transform.localScale, newScaleVector, 0.2f, TweenScaleFunctions.CubicEaseInOut, updateProgressScale);
if (accuracy > 90)
{
// Wait and go to next sign
yield return new WaitForSeconds(1);
templateCourse.NextSign();
}
}
else
{
progress.transform.localScale = new Vector3(0f, progress.transform.localScale.y, progress.transform.localScale.z);
//Debug.Log("doesn't contain A");
}
// Wait for 200 milliseconds before updating the scale again
yield return new WaitForSeconds(0.2f);
}
}
}
}

View File

@@ -1,5 +1,6 @@
using System;
using TMPro;
using Unity.Barracuda;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Video;
@@ -9,36 +10,17 @@ using UnityEngine.Video;
/// </summary>
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 textfield that holds the part of the feedback-window that will change: bad/good/excellent
/// </summary>
public TMP_Text dynamic;
// vvv TEMPORARY STUFF vvv
public NNModel previewModel;
public GameObject feedbackProgressBar;
public GameObject previewMessage;
// ^^^ TEMPORARY STUFF ^^^
/// <summary>
/// Reference to instructional video player
/// </summary>
public VideoPlayer player;
/// <summary>
/// Reference to pause button
/// </summary>
@@ -120,6 +102,11 @@ public class TemplateCourse : MonoBehaviour
/// </summary>
public TMP_Text timeSpent;
/// <summary>
/// Reference to the feedback script on the Feedback prefab
/// </summary>
public Feedback feedback;
/// <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.
@@ -129,21 +116,17 @@ public class TemplateCourse : MonoBehaviour
/// </summary>
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];
feedback.signPredictor.model = course.theme.model;
maxWords = course.theme.learnables.Count;
// vvv TEMPORARY STUFF vvv
feedbackProgressBar.SetActive(course.theme.model != null);
previewMessage.SetActive(course.theme.model == null);
feedback.signPredictor.model = previewModel;
// ^^^ TEMPORARY STUFF ^^^
// Create entry in current user for keeping track of progress
user = userList.GetCurrentUser();
progress = user.GetCourseProgress(course.index);
@@ -161,7 +144,7 @@ public class TemplateCourse : MonoBehaviour
// Setup UI
button.image.sprite = pauseSprite;
title.text = course.name;
title.text = course.title;
NextVideo();
NextImage();
@@ -169,6 +152,23 @@ public class TemplateCourse : MonoBehaviour
ResultPanel.SetActive(false);
// Set the startTime
startMoment = DateTime.Now;
// Set callbacks
feedback.getSignCallback = () =>
{
if (currentWordIndex < course.theme.learnables.Count)
{
return course.theme.learnables[currentWordIndex].name;
}
return null;
};
feedback.predictSignCallback = (sign) =>
{
if (sign == course.theme.learnables[currentWordIndex].name)
{
NextSign();
}
};
}
/// <summary>
@@ -269,80 +269,4 @@ public class TemplateCourse : MonoBehaviour
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);
//}
// Get currentWordIndex
public int GetWordIndex()
{
return currentWordIndex;
}
}

View File

@@ -1,7 +1,7 @@
using System.Collections;
using Mediapipe;
using System.Collections.Generic;
using UnityEngine;
using System.Linq;
using UnityEngine;
public class ModelInfo
{
@@ -12,17 +12,16 @@ public class ModelInfo
public class KeypointManager
{
private ModelInfo model_info;
private List<List<float>> keypoints_buffer;
private ModelInfo modelInfo;
private List<List<float>> keypointsBuffer;
public KeypointManager()
public KeypointManager(TextAsset modelInfoFile)
{
TextAsset model_info_json = Resources.Load<TextAsset>("Models/FingerSpelling/landmarks");
this.model_info = JsonUtility.FromJson<ModelInfo>(model_info_json.text);
this.keypoints_buffer = new List<List<float>>();
modelInfo = JsonUtility.FromJson<ModelInfo>(modelInfoFile.text);
keypointsBuffer = new List<List<float>>();
}
private (List<float>, List<float>) normalizeHand(List<float> hand_x, List<float> hand_y)
private (List<float>, List<float>) NormalizeHand(List<float> hand_x, List<float> hand_y)
{
float min_x = hand_x.Min();
@@ -54,7 +53,7 @@ public class KeypointManager
return (normalized_x, normalized_y);
}
public void addLandmarks(Mediapipe.NormalizedLandmarkList poseLandmarks, Mediapipe.NormalizedLandmarkList leftHandLandmarks, Mediapipe.NormalizedLandmarkList rightHandLandmarks)
public void AddLandmarks(NormalizedLandmarkList poseLandmarks, NormalizedLandmarkList leftHandLandmarks, NormalizedLandmarkList rightHandLandmarks)
{
List<float> pose_x = new List<float>();
List<float> pose_y = new List<float>();
@@ -65,7 +64,7 @@ public class KeypointManager
if (poseLandmarks != null)
{
foreach (var landmark_index in model_info.pose_landmarks)
foreach (int landmark_index in modelInfo.pose_landmarks)
{
pose_x.Add(poseLandmarks.Landmark[landmark_index].X);
pose_y.Add(poseLandmarks.Landmark[landmark_index].Y);
@@ -73,7 +72,7 @@ public class KeypointManager
}
else
{
foreach (var landmark_index in model_info.pose_landmarks)
foreach (int _ in modelInfo.pose_landmarks)
{
pose_x.Add(0);
pose_y.Add(0);
@@ -82,7 +81,7 @@ public class KeypointManager
foreach (var landmark_index in model_info.hand_landmarks)
foreach (int landmark_index in modelInfo.hand_landmarks)
{
if (leftHandLandmarks == null)
{
@@ -107,13 +106,15 @@ public class KeypointManager
}
// TODO: Add normalization
(left_hand_x, left_hand_y) = normalizeHand(left_hand_x, left_hand_y);
(right_hand_x, right_hand_y) = normalizeHand(right_hand_x, right_hand_y);
//Debug.Log($"pose_landMarks = [{modelInfo.pose_landmarks.Aggregate(" ", (t, f) => $"{t} {f}")}]");
//Debug.Log($"hand_landmarks = [{modelInfo.hand_landmarks.Aggregate(" ", (t, f) => $"{t} {f}")}]");
(left_hand_x, left_hand_y) = NormalizeHand(left_hand_x, left_hand_y);
(right_hand_x, right_hand_y) = NormalizeHand(right_hand_x, right_hand_y);
if (keypoints_buffer.Count >= 10)
if (keypointsBuffer.Count >= 10)
{
keypoints_buffer.RemoveAt(0);
keypointsBuffer.RemoveAt(0);
}
List<float> keypoints = new List<float>();
@@ -133,15 +134,15 @@ public class KeypointManager
keypoints.Add(right_hand_y[i]);
}
keypoints_buffer.Add(keypoints);
keypointsBuffer.Add(keypoints);
}
public List<List<float>> getAllKeypoints()
public List<List<float>> GetKeypoints()
{
if (keypoints_buffer.Count < 10)
if (keypointsBuffer.Count < 10)
{
return null;
}
return keypoints_buffer;
return keypointsBuffer;
}
}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: d2a1acaa9722345fb8f9d335700ccb30
guid: f985e6b2f4506ff45a14a0d651610b0d
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@@ -0,0 +1,471 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4318122119930585319
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4318122119930585316}
- component: {fileID: 4318122119930585317}
m_Layer: 5
m_Name: Feedback
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4318122119930585316
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4318122119930585319}
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: 4318122120222767926}
- {fileID: 4318122119968934245}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 0}
m_AnchoredPosition: {x: 0, y: 200}
m_SizeDelta: {x: 500, y: 150}
m_Pivot: {x: 0.5, y: 0}
--- !u!114 &4318122119930585317
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4318122119930585319}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 44e682a32ee15cc489bf50f3a06f717b, type: 3}
m_Name:
m_EditorClassIdentifier:
feedbackText: {fileID: 4318122120222767928}
feedbackProgress: {fileID: 4318122119968934242}
feedbackProgressImage: {fileID: 4318122120334233319}
signPredictor: {fileID: 0}
--- !u!1 &4318122119968934244
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4318122119968934245}
- component: {fileID: 4318122119968934242}
m_Layer: 5
m_Name: Progress
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4318122119968934245
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4318122119968934244}
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: 4318122120783817558}
- {fileID: 4318122121620266793}
m_Father: {fileID: 4318122119930585316}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 50}
m_Pivot: {x: 0.5, y: 0}
--- !u!114 &4318122119968934242
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4318122119968934244}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 67db9e8f0e2ae9c40bc1e2b64352a6b4, 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: 0}
m_FillRect: {fileID: 4318122120334233317}
m_HandleRect: {fileID: 0}
m_Direction: 0
m_MinValue: 0
m_MaxValue: 1
m_WholeNumbers: 0
m_Value: 0
m_OnValueChanged:
m_PersistentCalls:
m_Calls: []
--- !u!1 &4318122120222767931
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4318122120222767926}
- component: {fileID: 4318122120222767929}
- component: {fileID: 4318122120222767928}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4318122120222767926
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4318122120222767931}
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: 4318122119930585316}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 500, y: 100}
m_Pivot: {x: 0.5, y: 1}
--- !u!222 &4318122120222767929
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4318122120222767931}
m_CullTransparentMesh: 1
--- !u!114 &4318122120222767928
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4318122120222767931}
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: Detecteren ...
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: 4282188031
m_fontColor: {r: 1, g: 0, b: 0.23945475, 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: 1
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!1 &4318122120334233318
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4318122120334233317}
- component: {fileID: 4318122120334233316}
- component: {fileID: 4318122120334233319}
m_Layer: 5
m_Name: Fill
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4318122120334233317
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4318122120334233318}
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: 4318122121620266793}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 10, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4318122120334233316
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4318122120334233318}
m_CullTransparentMesh: 1
--- !u!114 &4318122120334233319
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4318122120334233318}
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: 1, g: 0, b: 0, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, 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!1 &4318122120783817561
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4318122120783817558}
- component: {fileID: 4318122120783817556}
- component: {fileID: 4318122120783817559}
m_Layer: 5
m_Name: Background
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4318122120783817558
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4318122120783817561}
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: 4318122119968934245}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4318122120783817556
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4318122120783817561}
m_CullTransparentMesh: 1
--- !u!114 &4318122120783817559
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4318122120783817561}
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: 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_Sprite: {fileID: 10907, 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!1 &4318122121620266792
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4318122121620266793}
m_Layer: 5
m_Name: Fill Area
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4318122121620266793
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4318122121620266792}
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: 4318122120334233317}
m_Father: {fileID: 4318122119968934245}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}

View File

@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: f2f3eb6345d7543f893098c608366c3e
TextScriptImporter:
guid: 7c71c65ecb5fe0449a8b0d178987f016
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:

View File

@@ -0,0 +1,180 @@
using DigitalRuby.Tween;
using Mediapipe.Unity.Tutorial;
using System;
using System.Collections;
using TMPro;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;
/// <summary>
/// Class to display feedback during a course
/// </summary>
public class Feedback : MonoBehaviour
{
/// <summary>
/// Reference to the feedback field
/// </summary>
public TMP_Text feedbackText;
/// <summary>
/// Reference to the progress bar
/// </summary>
public Slider feedbackProgress;
/// <summary>
/// Reference to the progress bar image, so we can add fancy colors
/// </summary>
public Image feedbackProgressImage;
/// <summary>
/// Reference to the sign predictor
/// </summary>
public SignPredictor signPredictor;
/// <summary>
/// Callback for getting the correct sign
/// </summary>
public Func<string> getSignCallback;
/// <summary>
/// Callback to initiate the next sign
/// </summary>
public UnityAction<string> predictSignCallback;
/// <summary>
/// Timer to keep track of how long a incorrect sign is performed
/// </summary>
private DateTime timer;
/// <summary>
/// Current predicted sign
/// </summary>
private string predictedSign = null;
/// <summary>
/// Previous incorrect sign, so we can keep track whether the user is wrong or the user is still changing signs
/// </summary>
private string previousIncorrectSign = null;
/// <summary>
/// Start is called before the first frame update
/// </summary>
void Start()
{
// Start the coroutine to update the scale every 200 milliseconds
StartCoroutine(UpdateFeedback());
}
/// <summary>
/// UpdateScale updates the progress bar every 200ms, updated the feedback text, and progress bar color
/// If a high enough accuracy is detected, it will go to the next sign
/// </summary>
/// <returns></returns>
IEnumerator UpdateFeedback()
{
while (true)
{
if (getSignCallback != null && predictSignCallback != null)
{
// Get current sign
string currentSign = getSignCallback();
// Get the predicted sign
if (signPredictor != null && signPredictor.learnableProbabilities != null &&
currentSign != null && signPredictor.learnableProbabilities.ContainsKey(currentSign))
{
float accuracy = signPredictor.learnableProbabilities[currentSign];
if (accuracy > 0.98)
{
// TODO: fix emojis
feedbackText.text = "✨ Perfect ✨";
Color col = new Color(0xff / 255.0f, 0xcc / 255.0f, 0x00 / 255.0f);
feedbackText.color = col;
feedbackProgressImage.color = col;
}
else if (accuracy > 0.95)
{
feedbackText.text = "Super!";
Color col = new Color(0x00 / 255.0f, 0xff / 255.0f, 0xcc / 255.0f);
feedbackText.color = col;
feedbackProgressImage.color = col;
}
else if (accuracy > 0.90)
{
feedbackText.text = "Goed";
feedbackText.color = Color.green;
feedbackProgressImage.color = Color.green;
}
else if (accuracy > 0.80)
{
feedbackText.text = "Bijna...";
Color col = new Color(0xff / 255.0f, 0x66 / 255.0f, 0x00 / 255.0f);
feedbackText.color = col;
feedbackProgressImage.color = col;
}
else
{
feedbackText.text = "Detecteren...";
feedbackText.color = Color.red;
feedbackProgressImage.color = Color.red;
}
float oldValue = feedbackProgress.value;
// use an exponential scale
float newValue = Mathf.Exp(4 * (accuracy - 1.0f));
feedbackProgress.gameObject.Tween("FeedbackUpdate", oldValue, newValue, 0.2f, TweenScaleFunctions.CubicEaseInOut, (t) =>
{
if (feedbackProgress != null)
{
feedbackProgress.value = t.CurrentValue;
}
});
// Check whether (in)correct sign has high accuracy
foreach (var kv in signPredictor.learnableProbabilities)
{
if (kv.Value > 0.90)
{
predictedSign = kv.Key;
// Correct sign
if (predictedSign == currentSign)
{
yield return new WaitForSeconds(1.0f);
predictSignCallback(predictedSign);
timer = DateTime.Now;
predictedSign = null;
previousIncorrectSign = null;
}
// Incorrect sign
else
{
if (previousIncorrectSign != predictedSign)
{
timer = DateTime.Now;
previousIncorrectSign = predictedSign;
}
else if (DateTime.Now - timer > TimeSpan.FromSeconds(2.0f))
{
predictSignCallback(predictedSign);
timer = DateTime.Now;
predictedSign = null;
previousIncorrectSign = null;
}
}
break;
}
}
}
else
{
feedbackProgress.value = 0.0f;
}
}
// Wait for 200 milliseconds before updating the scale again
yield return new WaitForSeconds(0.2f);
}
}
}

View File

@@ -5,7 +5,8 @@
"GUID:6055be8ebefd69e48b49212b09b47b2f",
"GUID:5c2b5ba89f9e74e418232e154bc5cc7a",
"GUID:04c4d86a70aa56c55a78c61f1ab1a56d",
"GUID:edc93f477bb73a743a97d6882ed330b3"
"GUID:edc93f477bb73a743a97d6882ed330b3",
"GUID:58e104b97fb3752438ada2902a36dcbf"
],
"includePlatforms": [],
"excludePlatforms": [],

View File

@@ -10,55 +10,70 @@ using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using TMPro;
using Unity.Barracuda;
using UnityEngine;
using UnityEngine.UI;
using Debug = UnityEngine.Debug;
namespace Mediapipe.Unity.Tutorial
{
public class Wesign_extractor : MonoBehaviour
public class SignPredictor : MonoBehaviour
{
/// <summary>
/// Reference to the model used in the SignPredictor
/// </summary>
public NNModel model;
/// <summary>
/// Reference to the model info file
/// </summary>
public TextAsset modelInfoFile;
/// <summary>
/// Config file to set up the graph
/// </summary>
[SerializeField] private TextAsset _configAsset;
[SerializeField]
private TextAsset configAsset;
/// <summary>
/// Index to indicate which camera is being used
/// </summary>
private int camdex = 0;
/// <summary>
/// The screen object on which the video is displayed
/// </summary>
[SerializeField] private RawImage _screen;
[SerializeField]
private RawImage screen;
/// <summary>
/// MediaPipe graph
/// </summary>
private CalculatorGraph _graph;
private CalculatorGraph graph;
/// <summary>
/// Resource manager for graph resources
/// </summary>
private ResourceManager _resourceManager;
private ResourceManager resourceManager;
/// <summary>
/// Webcam texture
/// </summary>
private WebCamTexture _webCamTexture;
private WebCamTexture webcamTexture;
/// <summary>
/// Input texture
/// </summary>
private Texture2D _inputTexture;
private Texture2D inputTexture;
/// <summary>
/// Screen pixel data
/// </summary>
private Color32[] _pixelData;
private Color32[] pixelData;
/// <summary>
/// Stopwatch to give a timestamp to video frames
/// </summary>
private Stopwatch _stopwatch;
private Stopwatch stopwatch;
/// <summary>
/// The mediapipe stream which contains the pose landmarks
@@ -78,12 +93,12 @@ namespace Mediapipe.Unity.Tutorial
/// <summary>
/// create precense stream
/// </summary>
public OutputStream<DetectionVectorPacket, List<Detection>> _presenceStream;
public OutputStream<DetectionVectorPacket, List<Detection>> presenceStream;
/// <summary>
/// A keypointmanager which does normalization stuff, keeps track of the landmarks
/// </summary>
private KeypointManager k;
private KeypointManager keypointManager;
/// <summary>
/// The worker on which we schedule the signpredictor model execution
@@ -93,22 +108,12 @@ namespace Mediapipe.Unity.Tutorial
/// <summary>
/// Width of th webcam
/// </summary>
private int _width;
private int width;
/// <summary>
/// Height of the webcam
/// </summary>
private int _height;
/// <summary>
/// ?The mediapipe stream which contains the tracked detections
/// </summary>
private const string _TrackedDetectionsStreamName = "tracked_detections";
/// <summary>
/// ?The mediapipe stream which contains the tracked detections
/// </summary>
private OutputStream<DetectionVectorPacket, List<Detection>> _trackedDetectionsStream;
private int height;
/// <summary>
/// The enumerator of the worker which executes the sign predictor model
@@ -118,7 +123,7 @@ namespace Mediapipe.Unity.Tutorial
/// <summary>
/// The prediction of the sign predictor model
/// </summary>
public Dictionary<char, float> letterProbabilities;
public Dictionary<string, float> learnableProbabilities;
/// <summary>
/// Bool indicating whether or not the resource manager has already been initialized
@@ -133,12 +138,10 @@ namespace Mediapipe.Unity.Tutorial
/// <summary>
/// Google Mediapipe setup & run
/// </summary>
/// <returns> IEnumerator </returns>
/// <returns>IEnumerator</returns>
/// <exception cref="System.Exception"></exception>
private IEnumerator Start()
{
Debug.Log("starting ...");
// Webcam setup
if (WebCamTexture.devices.Length == 0)
{
@@ -146,57 +149,57 @@ namespace Mediapipe.Unity.Tutorial
}
// Start the webcam
WebCamDevice webCamDevice = WebCamTexture.devices[0];
_webCamTexture = new WebCamTexture(webCamDevice.name);
webcamTexture = new WebCamTexture(webCamDevice.name);
_webCamTexture.Play();
webcamTexture.Play();
yield return new WaitUntil(() => _webCamTexture.width > 16);
yield return new WaitUntil(() => webcamTexture.width > 16);
// Set webcam aspect ratio
_width = _webCamTexture.width;
_height = _webCamTexture.height;
float webcamAspect = (float)_webCamTexture.width / (float)_webCamTexture.height;
_screen.rectTransform.sizeDelta = new Vector2(_screen.rectTransform.sizeDelta.y * webcamAspect, (_screen.rectTransform.sizeDelta.y));
_screen.texture = _webCamTexture;
width = webcamTexture.width;
height = webcamTexture.height;
float webcamAspect = (float)webcamTexture.width / (float)webcamTexture.height;
screen.rectTransform.sizeDelta = new Vector2(screen.rectTransform.sizeDelta.y * webcamAspect, (screen.rectTransform.sizeDelta.y));
screen.texture = webcamTexture;
// TODO this method is kinda meh you should use
_inputTexture = new Texture2D(_width, _height, TextureFormat.RGBA32, false);
_pixelData = new Color32[_width * _height];
inputTexture = new Texture2D(width, height, TextureFormat.RGBA32, false);
pixelData = new Color32[width * height];
if (!resourceManagerIsInitialized)
{
_resourceManager = new StreamingAssetsResourceManager();
yield return _resourceManager.PrepareAssetAsync("pose_detection.bytes");
yield return _resourceManager.PrepareAssetAsync("pose_landmark_full.bytes");
yield return _resourceManager.PrepareAssetAsync("face_landmark.bytes");
yield return _resourceManager.PrepareAssetAsync("hand_landmark_full.bytes");
yield return _resourceManager.PrepareAssetAsync("face_detection_short_range.bytes");
yield return _resourceManager.PrepareAssetAsync("hand_recrop.bytes");
yield return _resourceManager.PrepareAssetAsync("handedness.txt");
resourceManager = new StreamingAssetsResourceManager();
yield return resourceManager.PrepareAssetAsync("pose_detection.bytes");
yield return resourceManager.PrepareAssetAsync("pose_landmark_full.bytes");
yield return resourceManager.PrepareAssetAsync("face_landmark.bytes");
yield return resourceManager.PrepareAssetAsync("hand_landmark_full.bytes");
yield return resourceManager.PrepareAssetAsync("face_detection_short_range.bytes");
yield return resourceManager.PrepareAssetAsync("hand_recrop.bytes");
yield return resourceManager.PrepareAssetAsync("handedness.txt");
resourceManagerIsInitialized = true;
}
_stopwatch = new Stopwatch();
stopwatch = new Stopwatch();
// Setting up the graph
_graph = new CalculatorGraph(_configAsset.text);
graph = new CalculatorGraph(configAsset.text);
posestream = new OutputStream<NormalizedLandmarkListPacket, NormalizedLandmarkList>(_graph, "pose_landmarks", "pose_landmarks_presence");
leftstream = new OutputStream<NormalizedLandmarkListPacket, NormalizedLandmarkList>(_graph, "left_hand_landmarks", "left_hand_landmarks_presence");
rightstream = new OutputStream<NormalizedLandmarkListPacket, NormalizedLandmarkList>(_graph, "right_hand_landmarks", "right_hand_landmarks_presence");
posestream = new OutputStream<NormalizedLandmarkListPacket, NormalizedLandmarkList>(graph, "pose_landmarks", "pose_landmarks_presence");
leftstream = new OutputStream<NormalizedLandmarkListPacket, NormalizedLandmarkList>(graph, "left_hand_landmarks", "left_hand_landmarks_presence");
rightstream = new OutputStream<NormalizedLandmarkListPacket, NormalizedLandmarkList>(graph, "right_hand_landmarks", "right_hand_landmarks_presence");
posestream.StartPolling().AssertOk();
leftstream.StartPolling().AssertOk();
rightstream.StartPolling().AssertOk();
_graph.StartRun().AssertOk();
_stopwatch.Start();
graph.StartRun().AssertOk();
stopwatch.Start();
k = new KeypointManager();
keypointManager = new KeypointManager(modelInfoFile);
// check if model exists at path
var model = ModelLoader.Load(Resources.Load<NNModel>("Models/Fingerspelling/model_A-L"));
//var model = ModelLoader.Load(Resources.Load<NNModel>("Models/Fingerspelling/model_A-L"));
worker = model.CreateWorker();
StartCoroutine(SignRecognitionCoroutine());
@@ -211,25 +214,25 @@ namespace Mediapipe.Unity.Tutorial
{
while (true)
{
_inputTexture.SetPixels32(_webCamTexture.GetPixels32(_pixelData));
var imageFrame = new ImageFrame(ImageFormat.Types.Format.Srgba, _width, _height, _width * 4, _inputTexture.GetRawTextureData<byte>());
var currentTimestamp = _stopwatch.ElapsedTicks / (System.TimeSpan.TicksPerMillisecond / 1000);
_graph.AddPacketToInputStream("input_video", new ImageFramePacket(imageFrame, new Timestamp(currentTimestamp))).AssertOk();
inputTexture.SetPixels32(webcamTexture.GetPixels32(pixelData));
var imageFrame = new ImageFrame(ImageFormat.Types.Format.Srgba, width, height, width * 4, inputTexture.GetRawTextureData<byte>());
var currentTimestamp = stopwatch.ElapsedTicks / (System.TimeSpan.TicksPerMillisecond / 1000);
graph.AddPacketToInputStream("input_video", new ImageFramePacket(imageFrame, new Timestamp(currentTimestamp))).AssertOk();
//Debug.Log(Time.timeAsDouble + " Added new packet to mediapipe graph");
yield return new WaitForEndOfFrame();
Mediapipe.NormalizedLandmarkList _poseLandmarks = null;
Mediapipe.NormalizedLandmarkList _leftHandLandmarks = null;
Mediapipe.NormalizedLandmarkList _rightHandLandmarks = null;
NormalizedLandmarkList _poseLandmarks = null;
NormalizedLandmarkList _leftHandLandmarks = null;
NormalizedLandmarkList _rightHandLandmarks = null;
//Debug.Log("Extracting keypoints");
yield return new WaitUntil(() => { posestream.TryGetNext(out _poseLandmarks, false); return true;});
yield return new WaitUntil(() => { posestream.TryGetNext(out _poseLandmarks, false); return true; });
yield return new WaitUntil(() => { leftstream.TryGetNext(out _leftHandLandmarks, false); return true; });
yield return new WaitUntil(() => { rightstream.TryGetNext(out _rightHandLandmarks, false); return true; });
//Debug.Log(Time.timeAsDouble + " Retrieved landmarks ");
k.addLandmarks(_poseLandmarks, _leftHandLandmarks, _rightHandLandmarks);
keypointManager.AddLandmarks(_poseLandmarks, _leftHandLandmarks, _rightHandLandmarks);
}
}
@@ -241,7 +244,7 @@ namespace Mediapipe.Unity.Tutorial
{
while (true)
{
List<List<float>> input = k.getAllKeypoints();
List<List<float>> input = keypointManager.GetKeypoints();
if (input != null)
{
@@ -280,6 +283,7 @@ namespace Mediapipe.Unity.Tutorial
// Get the output as an array
float[] outputArray = output.ToReadOnlyArray();
//Debug.Log($"out = [{outputArray.Aggregate(" ", (t, f) => $"{t}{f} ")}]");
// Calculate the softmax of the output
float max = outputArray.Max();
@@ -295,16 +299,16 @@ namespace Mediapipe.Unity.Tutorial
float accuracy = (Mathf.RoundToInt(softmaxedOutput2[maxIndex] * 100));
// Set the letterProbabilities, currently used by Courses
letterProbabilities = new Dictionary<char, float>();
learnableProbabilities = new Dictionary<string, float>();
for (int i = 0; i < softmaxedOutput2.Length; i++)
{
letterProbabilities.Add((char)(i + 65), softmaxedOutput2[i]);
learnableProbabilities.Add(((char)(i + 65)).ToString(), softmaxedOutput2[i]);
}
//Debug.Log($"prob = [{learnableProbabilities.Aggregate(" ", (t, kv) => $"{t}{kv.Key}:{kv.Value} ")}]");
}
else
{
// Wait until next frame
//Debug.Log(Time.timeAsDouble + "No landmarks!");
yield return null;
}
}
@@ -315,29 +319,54 @@ namespace Mediapipe.Unity.Tutorial
/// </summary>
private void OnDestroy()
{
if (_webCamTexture != null)
if (webcamTexture != null)
{
_webCamTexture.Stop();
webcamTexture.Stop();
}
if (_graph != null)
if (graph != null)
{
try
{
_graph.CloseInputStream("input_video").AssertOk();
_graph.WaitUntilDone().AssertOk();
graph.CloseInputStream("input_video").AssertOk();
graph.WaitUntilDone().AssertOk();
}
finally
{
_graph.Dispose();
graph.Dispose();
}
}
// inputTensor must still be disposed, if it exists
inputTensor?.Dispose();
worker.Dispose();
worker?.Dispose();
}
/// <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 (webcamTexture.isPlaying)
{
screen.texture = null;
webcamTexture.Stop();
webcamTexture = null;
}
// Find the new camera
camdex += 1;
camdex %= WebCamTexture.devices.Length;
// Start the new camera
WebCamDevice device = WebCamTexture.devices[camdex];
webcamTexture = new WebCamTexture(device.name);
screen.texture = webcamTexture;
webcamTexture.Play();
}
}
}
}

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: c3f7371598add9549b5351c44a9e17b3
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: c0b415dc46ba9b4408c54913b0335504
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1 +0,0 @@
{"pose_landmarks": [0, 2, 5, 7, 8, 9, 11, 12, 13, 14, 15, 16], "hand_landmarks": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]}

View File

@@ -545,80 +545,6 @@ MonoBehaviour:
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &588634505
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 588634506}
- component: {fileID: 588634508}
- component: {fileID: 588634507}
m_Layer: 5
m_Name: Webcam-bg
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &588634506
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 588634505}
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: 1537631144}
m_Father: {fileID: 906197777}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -689, y: 82}
m_SizeDelta: {x: 464.2643, y: 449.3374}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &588634507
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 588634505}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, 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_Texture: {fileID: 8400000, guid: 60bb0835fc4bbb043b9b3d8ef48f96a8, type: 2}
m_UVRect:
serializedVersion: 2
x: 1
y: 0
width: -1
height: 1
--- !u!222 &588634508
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 588634505}
m_CullTransparentMesh: 1
--- !u!1 &608855339
GameObject:
m_ObjectHideFlags: 0
@@ -753,9 +679,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: 'Time
'
m_text: Tijd
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
@@ -890,7 +814,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Accuracy
m_text: Accuraatheid
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
@@ -1109,26 +1033,6 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 906197777}
m_Modifications:
- target: {fileID: 8299246693487308512, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8299246693487308512, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 1537631145}
- target: {fileID: 8299246693487308512, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: GotoThemeSelection
objectReference: {fileID: 0}
- target: {fileID: 8299246693487308512, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
value: SpellingBeeWebcam, Assembly-CSharp
objectReference: {fileID: 0}
- target: {fileID: 8299246693487308512, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_StringArgument
value: Common/Scenes/ThemeSelection
objectReference: {fileID: 0}
- target: {fileID: 8299246693487308514, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_Name
value: ButtonBack
@@ -1143,7 +1047,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_RootOrder
value: 5
value: 7
objectReference: {fileID: 0}
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
propertyPath: m_AnchorMax.x
@@ -1235,8 +1139,9 @@ GameObject:
- component: {fileID: 757133118}
- component: {fileID: 757133120}
- component: {fileID: 757133119}
- component: {fileID: 757133121}
m_Layer: 5
m_Name: Game over panel
m_Name: GameEnded Panel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@@ -1259,12 +1164,12 @@ RectTransform:
- {fileID: 1761838460}
- {fileID: 862382568}
m_Father: {fileID: 906197777}
m_RootOrder: 4
m_RootOrder: 6
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.000061035156}
m_SizeDelta: {x: -507.443, y: -192.4125}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: -500.00003, y: -180}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &757133119
MonoBehaviour:
@@ -1304,6 +1209,30 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 757133117}
m_CullTransparentMesh: 1
--- !u!114 &757133121
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 757133117}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5aa929dce1f59b340b4a0cca1bb68edc, type: 3}
m_Name:
m_EditorClassIdentifier:
userList: {fileID: 11400000, guid: 072bec636a40f7e4e93b0ac624a3bda2, type: 2}
endText: {fileID: 1502459770}
lpmText: {fileID: 1172084829}
lettersRightText: {fileID: 994850063}
lettersWrongText: {fileID: 1898716849}
lettersTotalText: {fileID: 12025428}
accuracyText: {fileID: 563056411}
wordsText: {fileID: 1754130538}
timeText: {fileID: 1052827058}
scoreText: {fileID: 653157662}
scoreboardEntriesContainer: {fileID: 1499197559}
scoreboardEntry: {fileID: 9154151134820372555, guid: d4a3a228b08d61847acc6da35b44e52c, type: 3}
--- !u!1 &778704239
GameObject:
m_ObjectHideFlags: 0
@@ -1362,7 +1291,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: 'Result
m_text: 'Resultaat
'
m_isRightToLeft: 0
@@ -1646,10 +1575,12 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 588634506}
- {fileID: 1743003086}
- {fileID: 1338727893}
- {fileID: 1346005056}
- {fileID: 1843239269}
- {fileID: 1812475781}
- {fileID: 967164044}
- {fileID: 757133118}
- {fileID: 667202413}
m_Father: {fileID: 1768150806}
@@ -1698,6 +1629,127 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 906197776}
m_CullTransparentMesh: 1
--- !u!1001 &967164043
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 906197777}
m_Modifications:
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_Pivot.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_Pivot.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_RootOrder
value: 5
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_AnchorMin.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_SizeDelta.x
value: 500
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_SizeDelta.y
value: 150
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_AnchoredPosition.x
value: -200
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_AnchoredPosition.y
value: -600
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4318122119930585317, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: signPredictor
value:
objectReference: {fileID: 1592592444}
- target: {fileID: 4318122119930585319, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_Name
value: Feedback
objectReference: {fileID: 0}
- target: {fileID: 4318122120334233317, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
--- !u!224 &967164044 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 4318122119930585316, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
m_PrefabInstance: {fileID: 967164043}
m_PrefabAsset: {fileID: 0}
--- !u!114 &967164045 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 4318122119930585317, guid: 7c71c65ecb5fe0449a8b0d178987f016, type: 3}
m_PrefabInstance: {fileID: 967164043}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 44e682a32ee15cc489bf50f3a06f717b, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &978093274
GameObject:
m_ObjectHideFlags: 0
@@ -2487,7 +2539,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -183.00024, y: 236.60397}
m_SizeDelta: {x: 132.6764, y: 35.648}
m_SizeDelta: {x: 150, y: 35.648}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1264330518
MonoBehaviour:
@@ -2509,9 +2561,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: 'Player
'
m_text: Gebruiker
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
@@ -2942,11 +2992,11 @@ RectTransform:
m_Father: {fileID: 906197777}
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}
m_AnchoredPosition: {x: 0, y: 128}
m_SizeDelta: {x: 256, y: 256}
m_Pivot: {x: 0.5, y: 0.5}
m_AnchorMin: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: -325, y: -300}
m_SizeDelta: {x: 250, y: 250}
m_Pivot: {x: 1, y: 1}
--- !u!1 &1346005055
GameObject:
m_ObjectHideFlags: 0
@@ -2979,11 +3029,11 @@ RectTransform:
m_Father: {fileID: 906197777}
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}
m_AnchoredPosition: {x: 0, y: -160}
m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 0}
m_AnchoredPosition: {x: 0, y: 75}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
m_Pivot: {x: 0.5, y: 0}
--- !u!114 &1346005057
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -3091,7 +3141,19 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 1346891279}
m_OnClick:
m_PersistentCalls:
m_Calls: []
m_Calls:
- m_Target: {fileID: 1768150807}
m_TargetAssemblyTypeName: GameController, SpellingBeeScripts
m_MethodName: Start
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &1346891279
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -3188,9 +3250,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: 'Words
'
m_text: Woorden
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
@@ -3676,51 +3736,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1502459768}
m_CullTransparentMesh: 1
--- !u!1 &1537631143
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1537631144}
- component: {fileID: 1537631145}
m_Layer: 0
m_Name: Webcam-controller
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1537631144
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1537631143}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -271, y: -622, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 588634506}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1537631145
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1537631143}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 98f2ddd1188ed310e8733106251729b6, type: 3}
m_Name:
m_EditorClassIdentifier:
display: {fileID: 588634507}
--- !u!1 &1570625040
GameObject:
m_ObjectHideFlags: 0
@@ -3856,6 +3871,54 @@ MonoBehaviour:
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &1592592442
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1592592445}
- component: {fileID: 1592592444}
m_Layer: 0
m_Name: SignPredictorController
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1592592444
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1592592442}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 043ccd99cf82b3cc9bf2e00956ce2b93, type: 3}
m_Name:
m_EditorClassIdentifier:
model: {fileID: 5022602860645237092, guid: 2594d8a9acfef6c4b88ce2618c4169cb, type: 3}
modelInfoFile: {fileID: 4900000, guid: fb8b51022bdcd654a9f29c054832a1b5, type: 3}
configAsset: {fileID: 4900000, guid: 6288c43cdca97374782dac1ea87aa029, type: 3}
screen: {fileID: 1743003084}
--- !u!4 &1592592445
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1592592442}
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: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1628221034
GameObject:
m_ObjectHideFlags: 0
@@ -3891,8 +3954,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 336.62088, y: 236.60397}
m_SizeDelta: {x: 99.1142, y: 35.648}
m_AnchoredPosition: {x: 330.34, y: 236.60397}
m_SizeDelta: {x: 120, y: 35.648}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1628221036
MonoBehaviour:
@@ -3914,7 +3977,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Ago
m_text: Geleden
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
@@ -3991,6 +4054,79 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1628221034}
m_CullTransparentMesh: 1
--- !u!1 &1743003083
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1743003086}
- component: {fileID: 1743003085}
- component: {fileID: 1743003084}
m_Layer: 5
m_Name: Webcam Background
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1743003084
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1743003083}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, 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_Texture: {fileID: 8400000, guid: 60bb0835fc4bbb043b9b3d8ef48f96a8, type: 2}
m_UVRect:
serializedVersion: 2
x: 1
y: 0
width: -1
height: 1
--- !u!222 &1743003085
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1743003083}
m_CullTransparentMesh: 1
--- !u!224 &1743003086
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1743003083}
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: 906197777}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 200, y: -300}
m_SizeDelta: {x: 960, y: 540}
m_Pivot: {x: 0, y: 1}
--- !u!1 &1754130535
GameObject:
m_ObjectHideFlags: 0
@@ -4415,27 +4551,152 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 44fbed5ae228de39b9f727def7578d06, type: 3}
m_Name:
m_EditorClassIdentifier:
themeList: {fileID: 11400000, guid: a96bdbd3b1486d947a196fa1eb41d90b, type: 2}
endText: {fileID: 1502459770}
lpmText: {fileID: 1172084829}
lettersRightText: {fileID: 994850063}
lettersWrongText: {fileID: 1898716849}
lettersText: {fileID: 12025428}
accuracyText: {fileID: 563056411}
wordsText: {fileID: 1754130538}
timeText: {fileID: 1052827058}
scoreText: {fileID: 653157662}
gameEndedPanel: {fileID: 757133117}
replayButton: {fileID: 1346891278}
themeList: {fileID: 0}
userList: {fileID: 11400000, guid: 072bec636a40f7e4e93b0ac624a3bda2, type: 2}
minigame: {fileID: 11400000, guid: 8a087d241d652634eb4f6352267ea7dc, type: 2}
letterPrefab: {fileID: 4639383499500021565, guid: c3e66e8957864914cb022af914df6a28, type: 3}
letterContainer: {fileID: 1346005056}
wordImage: {fileID: 1338727891}
timerText: {fileID: 1843239267}
bonusTimeText: {fileID: 1812475780}
Scoreboard: {fileID: 862382568}
EntriesGrid: {fileID: 1499197559}
scoreboardEntry: {fileID: 9154151134820372555, guid: d4a3a228b08d61847acc6da35b44e52c, type: 3}
feedback: {fileID: 967164045}
gameEndedPanel: {fileID: 757133117}
--- !u!1 &1812475780
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1812475781}
- component: {fileID: 1812475783}
- component: {fileID: 1812475782}
m_Layer: 5
m_Name: Bonus Time
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1812475781
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1812475780}
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: 906197777}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: -50}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &1812475782
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1812475780}
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: +5
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 3602bedf0ebe5b64596873f09eddf57b, type: 2}
m_sharedMaterial: {fileID: -1030930060397404263, guid: 3602bedf0ebe5b64596873f09eddf57b, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4280090368
m_fontColor: {r: 0, g: 1, b: 0.11084986, 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: 78
m_fontSizeBase: 78
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 4
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 &1812475783
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1812475780}
m_CullTransparentMesh: 1
--- !u!1 &1843239266
GameObject:
m_ObjectHideFlags: 0
@@ -4474,10 +4735,10 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text:
m_text: 00:00
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontAsset: {fileID: 11400000, guid: 3602bedf0ebe5b64596873f09eddf57b, type: 2}
m_sharedMaterial: {fileID: -1030930060397404263, guid: 3602bedf0ebe5b64596873f09eddf57b, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
@@ -4566,11 +4827,11 @@ RectTransform:
m_Father: {fileID: 906197777}
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}
m_AnchoredPosition: {x: 614, y: 414}
m_SizeDelta: {x: 390.7844, y: 148.7707}
m_Pivot: {x: 0.5, y: 0.5}
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: -100}
m_SizeDelta: {x: 300, y: 150}
m_Pivot: {x: 0.5, y: 1}
--- !u!1 &1898716846
GameObject:
m_ObjectHideFlags: 0
@@ -4764,7 +5025,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: (letters per minute)
m_text: (letters per minuut)
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}

View File

@@ -44,57 +44,6 @@ public partial class GameController : MonoBehaviour
/// </summary>
private float timerValue;
/// <summary>
/// "Game over" or "You win!"
/// </summary>
public TMP_Text endText;
/// <summary>
/// LPM
/// </summary>
public TMP_Text lpmText;
/// <summary>
/// Letters ( right | wrong )
/// </summary>
public TMP_Text lettersRightText;
public TMP_Text lettersWrongText;
/// <summary>
/// Letters
/// </summary>
public TMP_Text lettersText;
/// <summary>
/// Accuracy
/// </summary>
public TMP_Text accuracyText;
/// <summary>
/// Words
/// </summary>
public TMP_Text wordsText;
/// <summary>
/// Time
/// </summary>
public TMP_Text timeText;
/// <summary>
/// Score
/// </summary>
public TMP_Text scoreText;
/// <summary>
/// The game over panel
/// </summary>
public GameObject gameEndedPanel;
/// <summary>
/// Button for restarting the game
/// </summary>
public Button replayButton;
/// <summary>
/// Indicates if the game is still going
/// </summary>
@@ -104,7 +53,7 @@ public partial class GameController : MonoBehaviour
/// Amount of seconds user gets per letter of the current word
/// Set to 1 for testing; should be increased later
/// </summary>
private int secondsPerLetter = 1;
private const int secondsPerLetter = 5;
/// <summary>
/// Counter that keeps track of how many letters have been spelled correctly
@@ -136,24 +85,18 @@ public partial class GameController : MonoBehaviour
/// </summary>
private User user;
/// <summary>
/// Reference to the minigame progress of the current user
/// </summary>
private Progress progress = null;
/// <summary>
/// Reference to the minigame ScriptableObject
/// </summary>
public Minigame minigame;
/// <summary>
/// Letter prefab
/// </summary>
public GameObject letterPrefab;
/// <summary>
/// Reference to letter prefab
/// Reference to letter container
/// </summary>
public Transform letterContainer;
@@ -167,6 +110,16 @@ public partial class GameController : MonoBehaviour
/// </summary>
public TMP_Text timerText;
/// <summary>
/// Bonus time display
/// </summary>
public GameObject bonusTimeText;
/// <summary>
/// Timer to display the bonus time
/// </summary>
private float bonusActiveRemaining = 0.0f;
/// <summary>
/// The GameObjects representing the letters
/// </summary>
@@ -178,41 +131,39 @@ public partial class GameController : MonoBehaviour
public Transform Scoreboard;
/// <summary>
/// Reference to the entries grid
/// Accuracy feeback object
/// </summary>
public Transform EntriesGrid;
public Feedback feedback;
/// <summary>
/// The GameObjects representing the letters
/// Reference to the gameEnded panel, so we can update its display
/// </summary>
private List<GameObject> entries = new List<GameObject>();
/// <summary>
/// Reference to the ScoreboardEntry prefab
/// </summary>
public GameObject scoreboardEntry;
public GameObject gameEndedPanel;
/// <summary>
/// Start is called before the first frame update
/// </summary>
public void Start()
{
words.Clear();
correctLetters = 0;
incorrectLetters = 0;
words.Clear();
// We use -1 instead of 0 so SetNextWord can simply increment it each time
spelledWords = -1;
gameEnded = false;
wordIndex = 0;
timerValue = 0.0f;
gameEnded = false;
timerValue = 30.0f;
bonusActiveRemaining = 0.0f;
startTime = DateTime.Now;
gameEndedPanel.SetActive(false);
replayButton.onClick.AddListener(Start);
bonusTimeText.SetActive(false);
// Create entry in current user for keeping track of progress
user = userList.GetCurrentUser();
progress = user.GetMinigameProgress(minigame.index);
Progress progress = user.GetMinigameProgress(minigame.index);
if (progress == null)
{
progress = new Progress();
@@ -223,12 +174,30 @@ public partial class GameController : MonoBehaviour
}
userList.Save();
DeleteWord();
currentTheme = minigame.themeList.themes[minigame.themeList.currentThemeIndex];
feedback.signPredictor.model = currentTheme.model;
words.AddRange(currentTheme.learnables);
ShuffleWords();
SetNextWord();
NextWord();
// Set calllbacks
feedback.getSignCallback = () =>
{
if (letterIndex < currentWord.Length)
{
return currentWord[letterIndex].ToString().ToUpper();
}
return null;
};
feedback.predictSignCallback = (sign) =>
{
bool successful = sign.ToUpper() == currentWord[letterIndex].ToString().ToUpper();
if (successful)
{
AddSeconds(secondsPerLetter);
}
NextLetter(successful);
};
}
/// <summary>
@@ -238,32 +207,15 @@ public partial class GameController : MonoBehaviour
{
if (!gameEnded)
{
// Get keyboard input
// Check if the correct char has been given as input
foreach (char c in Input.inputString)
{
if (Char.ToUpper(c) == Char.ToUpper(currentWord[letterIndex]))
{
// correct letter
letters[letterIndex].GetComponent<Image>().color = Color.green;
correctLetters++;
letterIndex++;
if (letterIndex >= currentWord.Length)
{
DeleteWord();
StartCoroutine(Wait());
SetNextWord();
}
}
else
{
// incorrect letter
incorrectLetters++;
}
}
timerValue -= Time.deltaTime;
if (bonusActiveRemaining <= 0.0 && bonusTimeText.activeSelf)
{
bonusTimeText.SetActive(false);
}
else
{
bonusActiveRemaining -= Time.deltaTime;
}
if (timerValue <= 0.0f)
{
@@ -302,59 +254,26 @@ public partial class GameController : MonoBehaviour
return spelledWords * 5 + correctLetters;
}
/// <summary>
/// Set score metrics
/// </summary>
private void SetScoreMetrics()
{
// LPM
TimeSpan duration = DateTime.Now.Subtract(startTime);
lpmText.text = (60f * correctLetters / duration.TotalSeconds).ToString("#") + " LPM";
// Letters ( right | wrong ) total
lettersRightText.text = correctLetters.ToString();
lettersWrongText.text = incorrectLetters.ToString();
lettersText.text = (correctLetters + incorrectLetters).ToString();
// Accuracy
if (correctLetters + incorrectLetters > 0)
{
accuracyText.text = ((correctLetters) * 100f / (correctLetters + incorrectLetters)).ToString("#.##") + "%";
}
else
{
accuracyText.text = "-";
}
// Words
wordsText.text = spelledWords.ToString();
// Time
timeText.text = duration.ToString(@"mm\:ss");
// Score
scoreText.text = "Score: " + CalculateScore().ToString();
}
/// <summary>
/// Displays the game over panel and score values
/// </summary>
private void ActivateGameOver()
{
DeleteWord();
endText.text = "GAME OVER";
SetScoreMetrics();
gameEndedPanel.SetActive(true);
gameEndedPanel.transform.SetAsLastSibling();
gameEnded = true;
DeleteWord();
// Save the scores and show the scoreboard
SaveScores();
SetScoreBoard();
gameEndedPanel.GetComponent<GameEndedPanel>().GenerateContent(
startTime: startTime,
totalWords: spelledWords,
correctLetters: correctLetters,
incorrectLetters: incorrectLetters,
result: "VERLOREN",
score: CalculateScore()
);
gameEndedPanel.SetActive(true);
}
/// <summary>
@@ -362,20 +281,21 @@ public partial class GameController : MonoBehaviour
/// </summary>
private void ActivateWin()
{
// @lukas stuff
DeleteWord();
endText.text = "YOU WIN!";
SetScoreMetrics();
gameEndedPanel.SetActive(true);
gameEndedPanel.transform.SetAsLastSibling();
gameEnded = true;
DeleteWord();
// Save the scores and show the scoreboard
SaveScores();
SetScoreBoard();
gameEndedPanel.GetComponent<GameEndedPanel>().GenerateContent(
startTime: startTime,
totalWords: spelledWords,
correctLetters: correctLetters,
incorrectLetters: incorrectLetters,
result: "GEWONNEN",
score: CalculateScore()
);
gameEndedPanel.SetActive(true);
}
/// <summary>
@@ -384,7 +304,8 @@ public partial class GameController : MonoBehaviour
private void SaveScores()
{
// Calculate new score
int newScore = spelledWords * 5 + correctLetters;
int newScore = CalculateScore();
// Save the score as a tuple: < int score, string time ago>
Score score = new Score();
score.scoreValue = newScore;
@@ -392,7 +313,7 @@ public partial class GameController : MonoBehaviour
// Save the new score
user = userList.GetCurrentUser();
progress = user.GetMinigameProgress(minigame.index);
Progress progress = user.GetMinigameProgress(minigame.index);
// Get the current list of scores
List<Score> latestScores = progress.Get<List<Score>>("latestScores");
@@ -409,110 +330,9 @@ public partial class GameController : MonoBehaviour
progress.AddOrUpdate<List<Score>>("latestScores", latestScores.Take(10).ToList());
progress.AddOrUpdate<List<Score>>("highestScores", highestScores.Take(10).ToList());
Debug.Log(progress.Get<List<Score>>("highestScores"));
userList.Save();
}
/// <summary>
/// Sets the scoreboard
/// </summary>
private void SetScoreBoard()
{
// Clean the previous scoreboard entries
for (int i = 0; i < entries.Count; i++)
{
Destroy(entries[i]);
}
entries.Clear();
// Instantiate new entries
// Get all scores from all users
List<Tuple<string, Score>> allScores = new List<Tuple<string, Score>>();
foreach (User user in userList.GetUsers())
{
// Get user's progress for this minigame
progress = user.GetMinigameProgress(minigame.index);
if (progress != null)
{
// Add scores to dictionary
List<Score> scores = progress.Get<List<Score>>("highestScores");
foreach (Score score in scores)
{
allScores.Add(new Tuple<string, Score>(user.username, score));
}
}
}
// Sort allScores based on Score.scoreValue
allScores.Sort((a, b) => b.Item2.scoreValue.CompareTo(a.Item2.scoreValue));
// Instantiate scoreboard entries
int rank = 1;
foreach (Tuple<string, Score> tup in allScores.Take(10))
{
string username = tup.Item1;
Score score = tup.Item2;
GameObject entry = Instantiate(scoreboardEntry, EntriesGrid);
entries.Add(entry);
// Set the player icon
entry.transform.Find("Image").GetComponent<Image>().sprite = userList.GetUserByUsername(username).avatar;
// Set the player name
entry.transform.Find("PlayerName").GetComponent<TMP_Text>().text = username;
// Set the score
entry.transform.Find("Score").GetComponent<TMP_Text>().text = score.scoreValue.ToString();
// Set the rank
entry.transform.Find("Rank").GetComponent<TMP_Text>().text = rank.ToString();
// Set the ago
// Convert the score.time to Datetime
DateTime time = DateTime.Parse(score.time);
DateTime currentTime = DateTime.Now;
TimeSpan diff = currentTime.Subtract(time);
string formatted;
if (diff.Days > 0)
{
formatted = $"{diff.Days}d ";
}
else if (diff.Hours > 0)
{
formatted = $"{diff.Hours}h ";
}
else if (diff.Minutes > 0)
{
formatted = $"{diff.Minutes}m ";
}
else
{
formatted = "now";
}
entry.transform.Find("Ago").GetComponent<TMP_Text>().text = formatted;
// Alternating colors looks nice
if (rank % 2 == 0)
{
Image image = entry.transform.GetComponent<Image>();
image.color = new Color(image.color.r, image.color.g, image.color.b, 0f);
}
// Make new score stand out
if (diff.TotalSeconds < 1)
{
Image image = entry.transform.GetComponent<Image>();
image.color = new Color(0, 229, 255, 233);
}
rank++;
}
}
/// <summary>
/// Delete all letter objects
/// </summary>
@@ -532,23 +352,57 @@ public partial class GameController : MonoBehaviour
private void AddSeconds(int seconds)
{
timerValue += (float)seconds;
bonusTimeText.SetActive(true);
bonusActiveRemaining = 2.0f;
}
/// <summary>
/// Display the next letter
/// </summary>
/// <param name="successful">true if the letter was correctly signed, false otherwise</param>
private void NextLetter(bool successful)
{
// Change color of current letter (skip spaces)
if (successful)
{
correctLetters++;
letters[letterIndex].GetComponent<Image>().color = Color.green;
}
else
{
incorrectLetters++;
letters[letterIndex].GetComponent<Image>().color = new Color(0.5f, 0.0f, 0.0f);
}
do
{
letterIndex++;
} while (letterIndex < currentWord.Length && currentWord[letterIndex] == ' ');
// Change the color of the next letter or change to new word
if (letterIndex < currentWord.Length)
{
letters[letterIndex].GetComponent<Image>().color = Color.yellow;
}
else
{
StartCoroutine(Wait());
NextWord();
}
}
/// <summary>
/// Display next word in the series
/// </summary>
private void SetNextWord()
private void NextWord()
{
DeleteWord();
spelledWords++;
if (wordIndex < words.Count)
{
currentWord = words[wordIndex].name;
//ChangeSprite(currentWord);
DisplayWord(currentWord);
AddSeconds(currentWord.Length * secondsPerLetter + 1);
letterIndex = 0;
wordIndex++;
@@ -572,10 +426,11 @@ public partial class GameController : MonoBehaviour
letters.Add(instance);
// Dynamically load appearance
char c = Char.ToUpper(word[i]);
Image background = instance.GetComponent<Image>();
background.color = Color.red;
background.color = i == 0 ? Color.yellow : c != ' ' ? Color.red : Color.clear;
TMP_Text txt = instance.GetComponentInChildren<TMP_Text>();
txt.text = Char.ToString(Char.ToUpper(word[i]));
txt.text = Char.ToString(c);
}
wordImage.sprite = words[wordIndex].image;
}

View File

@@ -0,0 +1,212 @@
using System;
using System.Collections.Generic;
using System.Linq;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class GameEndedPanel : MonoBehaviour
{
public UserList userList;
/// <summary>
/// "VERLOREN" or "GEWONNEN"
/// </summary>
public TMP_Text endText;
/// <summary>
/// LPM
/// </summary>
public TMP_Text lpmText;
/// <summary>
/// Letters ( right | wrong )
/// </summary>
public TMP_Text lettersRightText;
public TMP_Text lettersWrongText;
/// <summary>
/// Letters
/// </summary>
public TMP_Text lettersTotalText;
/// <summary>
/// Accuracy
/// </summary>
public TMP_Text accuracyText;
/// <summary>
/// Words
/// </summary>
public TMP_Text wordsText;
/// <summary>
/// Time
/// </summary>
public TMP_Text timeText;
/// <summary>
/// Score
/// </summary>
public TMP_Text scoreText;
/// <summary>
/// Reference to the scoreboard entries container
/// </summary>
public Transform scoreboardEntriesContainer;
/// <summary>
/// The GameObjects representing the letters
/// </summary>
private List<GameObject> scoreboardEntries = new List<GameObject>();
/// <summary>
/// Reference to the ScoreboardEntry prefab
/// </summary>
public GameObject scoreboardEntry;
/// <summary>
/// Generate the content of the GameEnded panel
/// </summary>
/// <param name="startTime">Time of starting the minigame</param>
/// <param name="totalWords">Total number of words</param>
/// <param name="correctLetters">Total number of correctly spelled letters</param>
/// <param name="incorrectLetters">Total number of incorrectly spelled letters</param>
/// <param name="result">"VERLOREN" or "GEWONNEN"</param>
/// <param name="score">Final score</param>
public void GenerateContent(DateTime startTime, int totalWords, int correctLetters, int incorrectLetters, string result, int score)
{
// Final result
endText.text = result;
// LPM
TimeSpan duration = DateTime.Now.Subtract(startTime);
lpmText.text = (60f * correctLetters / duration.TotalSeconds).ToString("#") + " LPM";
// Letters ( right | wrong ) total
lettersRightText.text = correctLetters.ToString();
lettersWrongText.text = incorrectLetters.ToString();
lettersTotalText.text = (correctLetters + incorrectLetters).ToString();
// Accuracy
if (correctLetters + incorrectLetters > 0)
{
accuracyText.text = ((correctLetters) * 100f / (correctLetters + incorrectLetters)).ToString("#.##") + "%";
}
else
{
accuracyText.text = "-";
}
// Words
wordsText.text = $"{totalWords}";
// Time
timeText.text = duration.ToString(@"mm\:ss");
// Score
scoreText.text = $"Score: {score}";
SetScoreBoard();
}
/// <summary>
/// Sets the scoreboard
/// </summary>
private void SetScoreBoard()
{
// Clean the previous scoreboard entries
for (int i = 0; i < scoreboardEntries.Count; i++)
{
Destroy(scoreboardEntries[i]);
}
scoreboardEntries.Clear();
// Instantiate new entries
// Get all scores from all users
List<Tuple<string, Score>> allScores = new List<Tuple<string, Score>>();
foreach (User user in userList.GetUsers())
{
// Get user's progress for this minigame
Progress progress = user.GetMinigameProgress(MinigameIndex.SPELLING_BEE);
if (progress != null)
{
// Add scores to dictionary
List<Score> scores = progress.Get<List<Score>>("highestScores");
foreach (Score score in scores)
{
allScores.Add(new Tuple<string, Score>(user.username, score));
}
}
}
// Sort allScores based on Score.scoreValue
allScores.Sort((a, b) => b.Item2.scoreValue.CompareTo(a.Item2.scoreValue));
// Instantiate scoreboard entries
int rank = 1;
foreach (Tuple<string, Score> tup in allScores.Take(10))
{
string username = tup.Item1;
Score score = tup.Item2;
GameObject entry = Instantiate(scoreboardEntry, scoreboardEntriesContainer);
scoreboardEntries.Add(entry);
// Set the player icon
entry.transform.Find("Image").GetComponent<Image>().sprite = userList.GetUserByUsername(username).avatar;
// Set the player name
entry.transform.Find("PlayerName").GetComponent<TMP_Text>().text = username;
// Set the score
entry.transform.Find("Score").GetComponent<TMP_Text>().text = score.scoreValue.ToString();
// Set the rank
entry.transform.Find("Rank").GetComponent<TMP_Text>().text = rank.ToString();
// Set the ago
// Convert the score.time to Datetime
DateTime time = DateTime.Parse(score.time);
DateTime currentTime = DateTime.Now;
TimeSpan diff = currentTime.Subtract(time);
string formatted;
if (diff.Days > 0)
{
formatted = $"{diff.Days}d ";
}
else if (diff.Hours > 0)
{
formatted = $"{diff.Hours}h ";
}
else if (diff.Minutes > 0)
{
formatted = $"{diff.Minutes}m ";
}
else
{
formatted = "now";
}
entry.transform.Find("Ago").GetComponent<TMP_Text>().text = formatted;
// Alternating colors looks nice
if (rank % 2 == 0)
{
Image image = entry.transform.GetComponent<Image>();
image.color = new Color(image.color.r, image.color.g, image.color.b, 0f);
}
// Make new score stand out
if (diff.TotalSeconds < 1)
{
Image image = entry.transform.GetComponent<Image>();
image.color = new Color(0, 229, 255, 233);
}
rank++;
}
}
}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 98f2ddd1188ed310e8733106251729b6
guid: 5aa929dce1f59b340b4a0cca1bb68edc
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -5,6 +5,8 @@
"GUID:6055be8ebefd69e48b49212b09b47b2f",
"GUID:1631ed2680c61245b8211d943c1639a8",
"GUID:3444c67d5a3a93e5a95a48906078c372",
"GUID:d0b6b39a21908f94fbbd9f2c196a9725",
"GUID:5c2b5ba89f9e74e418232e154bc5cc7a",
"GUID:7f2d0ee6dd21e1d4eb25b71b7a749d25"
],
"includePlatforms": [],

View File

@@ -1,72 +0,0 @@
using UnityEngine;
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>
int camdex = 0;
/// <summary>
/// Texture to paste on the display
/// </summary>
WebCamTexture tex;
/// <summary>
/// Display for the video feed
/// </summary>
public RawImage display;
/// <summary>
/// Setup the webcam correctly
/// </summary>
void Awake()
{
WebCamDevice device = WebCamTexture.devices[camdex];
tex = new WebCamTexture(device.name);
display.texture = tex;
tex.Play();
}
/// <summary>
/// Swap webcam by cycling through the `WebCamTexture.devices` list
/// </summary>
public void SwapCam()
{
if (WebCamTexture.devices.Length > 0)
{
// Stop the old camera
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>
/// Scene changing is implemented here to avoid problems with webcam
/// </summary>
public void GotoThemeSelection()
{
display.texture = null;
tex.Stop();
tex = null;
SystemController.GetInstance().BackToPreviousScene();
}
}

View File

@@ -1 +0,0 @@
{"currentUserIndex":0,"storedUsers":[{"username":"35","avatar":{"instanceID":24468},"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,72,73,110,116,101,114,102,97,99,101,115,83,99,114,105,112,116,115,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,217,137,157,61,11]}]}],"minigames":[]}]}

View File

@@ -73,11 +73,10 @@ public class CourseMenuScreen : MonoBehaviour
}
/// <summary>
/// Method used as callback for course item onClick events
/// Method used as callback for 'all courses' button 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 GotoListOfCourses()
{
SystemController.GetInstance().LoadNextScene(sceneName);
SystemController.GetInstance().LoadNextScene("Common/Scenes/ListCoursesScreen");
}
}