Merge branch 'WES-54-INFO' into 'development'
Resolve WES-54 "Info" See merge request wesign/unity-application!35
This commit was merged in pull request #35.
This commit is contained in:
File diff suppressed because one or more lines are too long
396
Assets/Common/Prefabs/UserInfoHS.prefab
Normal file
396
Assets/Common/Prefabs/UserInfoHS.prefab
Normal file
@@ -0,0 +1,396 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &381012860887265132
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 381012860887265135}
|
||||
- component: {fileID: 381012860887265105}
|
||||
- component: {fileID: 381012860887265134}
|
||||
m_Layer: 5
|
||||
m_Name: Score
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &381012860887265135
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 381012860887265132}
|
||||
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: 381012861935775044}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 120, y: 10}
|
||||
m_SizeDelta: {x: 300, y: 80}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!222 &381012860887265105
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 381012860887265132}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &381012860887265134
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 381012860887265132}
|
||||
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: Score 1
|
||||
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: 4288255380
|
||||
m_fontColor: {r: 0.5803922, g: 0.58431375, b: 0.6, 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: 40
|
||||
m_fontSizeBase: 40
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 1
|
||||
m_VerticalAlignment: 1024
|
||||
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 &381012861935775045
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 381012861935775044}
|
||||
- component: {fileID: 381012861935775046}
|
||||
m_Layer: 5
|
||||
m_Name: UserInfoHS
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &381012861935775044
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 381012861935775045}
|
||||
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: 381012862209399491}
|
||||
- {fileID: 381012860887265135}
|
||||
- {fileID: 6828686836343787011}
|
||||
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_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &381012861935775046
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 381012861935775045}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &381012862209399488
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 381012862209399491}
|
||||
- component: {fileID: 381012862209399493}
|
||||
- component: {fileID: 381012862209399490}
|
||||
m_Layer: 5
|
||||
m_Name: Avatar
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &381012862209399491
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 381012862209399488}
|
||||
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: 381012861935775044}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 0.5}
|
||||
m_AnchorMax: {x: 1, y: 0.5}
|
||||
m_AnchoredPosition: {x: -294, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 1, y: 0.5}
|
||||
--- !u!222 &381012862209399493
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 381012862209399488}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &381012862209399490
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 381012862209399488}
|
||||
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: 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 &1510507605101839666
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6828686836343787011}
|
||||
- component: {fileID: 5606047852153443535}
|
||||
- component: {fileID: 4123359612391490762}
|
||||
m_Layer: 5
|
||||
m_Name: Title
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6828686836343787011
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1510507605101839666}
|
||||
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: 381012861935775044}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 120, y: -20}
|
||||
m_SizeDelta: {x: 500, y: 80}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!222 &5606047852153443535
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1510507605101839666}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &4123359612391490762
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1510507605101839666}
|
||||
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: Dries
|
||||
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: 4292118016
|
||||
m_fontColor: {r: 0, g: 0.5254902, b: 0.8313726, 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: 40
|
||||
m_fontSizeBase: 40
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 1
|
||||
m_HorizontalAlignment: 1
|
||||
m_VerticalAlignment: 256
|
||||
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}
|
||||
7
Assets/Common/Prefabs/UserInfoHS.prefab.meta
Normal file
7
Assets/Common/Prefabs/UserInfoHS.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 154c17a838d2896499bd76d28a584222
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
2013
Assets/Common/Scenes/InfoCourse.unity
Normal file
2013
Assets/Common/Scenes/InfoCourse.unity
Normal file
File diff suppressed because it is too large
Load Diff
11
Assets/Common/Scenes/InfoCourse.unity.meta
Normal file
11
Assets/Common/Scenes/InfoCourse.unity.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
<<<<<<<< HEAD:Assets/Common/Scenes/InfoCourse.unity.meta
|
||||
guid: 5ff44b09f5858a64692f58938fd6d2ff
|
||||
========
|
||||
guid: 652195ae9a0ff3ad18f6338db6a909bd
|
||||
>>>>>>>> development:Assets/SpellingBee/Scenes/Game.unity.meta
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
1746
Assets/Common/Scenes/InfoMinigame.unity
Normal file
1746
Assets/Common/Scenes/InfoMinigame.unity
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Common/Scenes/InfoMinigame.unity.meta
Normal file
7
Assets/Common/Scenes/InfoMinigame.unity.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8e27404f21454dc4583f76b4c7df0c30
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -68,6 +68,6 @@ public class CourseItem : MonoBehaviour
|
||||
slider.GetComponent<Slider>().value = progress;
|
||||
|
||||
// Add click functionality
|
||||
button.onClick.AddListener(() => SceneManager.LoadScene("Courses/Scenes/Course_0"));
|
||||
button.onClick.AddListener(() => SceneManager.LoadScene("Common/Scenes/InfoCourse"));
|
||||
}
|
||||
}
|
||||
|
||||
71
Assets/Common/Scripts/InfoCourse.cs
Normal file
71
Assets/Common/Scripts/InfoCourse.cs
Normal file
@@ -0,0 +1,71 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using TMPro; // For text
|
||||
|
||||
/// <summary>
|
||||
/// Manager infopage for the Courses
|
||||
/// </summary>
|
||||
public class InfoCourse : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// Reference to the courses
|
||||
/// </summary>
|
||||
public CourseList list;
|
||||
// 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
|
||||
/// </summary>
|
||||
public UserList userList;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the course progress
|
||||
/// </summary>
|
||||
private Progress progress;
|
||||
|
||||
/// <summary>
|
||||
/// Title Display
|
||||
/// </summary>
|
||||
public TMP_Text title;
|
||||
|
||||
/// <summary>
|
||||
/// Description Display
|
||||
/// </summary>
|
||||
public TMP_Text description;
|
||||
|
||||
/// <summary>
|
||||
/// Image Display (Thumbnail)
|
||||
/// </summary>
|
||||
public Image courseImage;
|
||||
|
||||
/// <summary>
|
||||
/// Progress bar Display
|
||||
/// </summary>
|
||||
public Slider slider;
|
||||
|
||||
|
||||
// Start is called before the first frame update
|
||||
/// <summary>
|
||||
/// Sets the infopage for a given course
|
||||
/// </summary>
|
||||
void Start()
|
||||
{
|
||||
int index = list.currentCourseIndex;
|
||||
Course course = list.courses[index];
|
||||
|
||||
title.text = course.title;
|
||||
description.text = course.description;
|
||||
courseImage.sprite = course.thumbnail;
|
||||
//slider.value = progressValue;
|
||||
|
||||
// Set progress
|
||||
progress = userList.GetCurrentUser().GetCourseProgress(course.index);
|
||||
if (progress != null)
|
||||
slider.value = progress.Get<float>("courseProgress");
|
||||
else
|
||||
slider.value = 0.0f;
|
||||
}
|
||||
|
||||
}
|
||||
11
Assets/Common/Scripts/InfoCourse.cs.meta
Normal file
11
Assets/Common/Scripts/InfoCourse.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4ee87f3cdcccf934b82f9531c90f3457
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
143
Assets/Common/Scripts/InfoMinigame.cs
Normal file
143
Assets/Common/Scripts/InfoMinigame.cs
Normal file
@@ -0,0 +1,143 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using TMPro;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
using static GameController;
|
||||
|
||||
/// <summary>
|
||||
/// Manager infopage for the Minigames
|
||||
/// </summary>
|
||||
public class InfoMinigame : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// Reference to the Minigames
|
||||
/// </summary>
|
||||
public MinigameList list;
|
||||
|
||||
/// <summary>
|
||||
/// Title Display
|
||||
/// </summary>
|
||||
public TMP_Text title;
|
||||
|
||||
/// <summary>
|
||||
/// Description Display
|
||||
/// </summary>
|
||||
public TMP_Text description;
|
||||
|
||||
/// <summary>
|
||||
/// Image Display (Thumbnail)
|
||||
/// </summary>
|
||||
public Image gameImage;
|
||||
|
||||
/// <summary>
|
||||
/// PlayButton to get to the Minigame
|
||||
/// </summary>
|
||||
public Button button;
|
||||
|
||||
/// <summary>
|
||||
/// Control explanation for the Display
|
||||
/// </summary>
|
||||
public TMP_Text controls;
|
||||
|
||||
// Scores for each user
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the users
|
||||
/// </summary>
|
||||
public UserList userList;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the Minigame progress
|
||||
/// </summary>
|
||||
private Progress progress;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the users-high-scores container object
|
||||
/// </summary>
|
||||
public Transform userContainer;
|
||||
|
||||
/// <summary>
|
||||
/// Prefab for the high-score-entries
|
||||
/// </summary>
|
||||
public GameObject prefab;
|
||||
|
||||
// Start is called before the first frame update
|
||||
/// <summary>
|
||||
/// Sets the infopage for a given minigame
|
||||
/// </summary>
|
||||
void Start()
|
||||
{
|
||||
GenerateContent();
|
||||
GenerateHighScores();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generates all content accept for the HighScores
|
||||
/// </summary>
|
||||
private void GenerateContent()
|
||||
{
|
||||
// Get current minigame
|
||||
int index = list.currentMinigameIndex;
|
||||
Minigame minigame = list.minigames[index];
|
||||
|
||||
// Set main screen
|
||||
title.text = minigame.title;
|
||||
description.text = minigame.description;
|
||||
gameImage.sprite = minigame.thumbnail;
|
||||
controls.text = minigame.controls;
|
||||
|
||||
// Add click functionality
|
||||
button.onClick.AddListener(() => SceneManager.LoadScene(minigame.minigameEntryPoint));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the High Scores (Top 3)
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// TODO: Maybe write a getter for the sorted scores as this is just a copy of the logic implemented in SpellingBee/.../GameController
|
||||
/// </remarks>
|
||||
private void GenerateHighScores()
|
||||
{
|
||||
// Get current minigame
|
||||
int index = list.currentMinigameIndex;
|
||||
Minigame minigame = list.minigames[index];
|
||||
|
||||
List<Tuple<string, Sprite, Score>> allScores = new List<Tuple<string, Sprite, Score>>();
|
||||
foreach (User user in userList.GetUsers())
|
||||
{
|
||||
// Get user's progress for this minigame
|
||||
progress = user.minigames.Find((p) => p != null && p.Get<MinigameIndex>("minigameIndex") == minigame.index);
|
||||
if (progress != null)
|
||||
{
|
||||
// Add scores to dictionary
|
||||
List<Score> scores = progress.Get<List<Score>>("scores");
|
||||
foreach (Score score in scores)
|
||||
{
|
||||
allScores.Add(new Tuple<string, Sprite, Score>(user.username, user.avatar, score));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Sort allScores based on Score.scoreValue
|
||||
allScores.Sort((a, b) => b.Item3.scoreValue.CompareTo(a.Item3.scoreValue));
|
||||
|
||||
// Instantiate scoreboard entries
|
||||
foreach (Tuple<string, Sprite, Score> tup in allScores.Take(3))
|
||||
{
|
||||
string username = tup.Item1;
|
||||
Sprite sprite = tup.Item2;
|
||||
Score score = tup.Item3;
|
||||
|
||||
GameObject instance = GameObject.Instantiate(prefab, userContainer);
|
||||
instance.transform.Find("Title").GetComponent<TMP_Text>().text = username;
|
||||
instance.transform.Find("Avatar").GetComponent<Image>().sprite = sprite;
|
||||
instance.transform.Find("Score").GetComponent<TMP_Text>().text = score.scoreValue.ToString();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Common/Scripts/InfoMinigame.cs.meta
Normal file
11
Assets/Common/Scripts/InfoMinigame.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 90de9a5c57c2189429073f8aadc9e9b7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -30,4 +30,10 @@ public class Minigame : ScriptableObject
|
||||
/// The path to the minigame starting scene (<c>path == $"Assets/{minigameEntryPoint}"</c>)
|
||||
/// </summary>
|
||||
public string minigameEntryPoint;
|
||||
|
||||
/// <summary>
|
||||
/// An explanation on how to play the game and score points
|
||||
/// </summary>
|
||||
public string controls;
|
||||
|
||||
}
|
||||
|
||||
@@ -47,6 +47,6 @@ public class MinigameItem : MonoBehaviour
|
||||
title.text = minigame.title;
|
||||
|
||||
// Add click functionality
|
||||
button.onClick.AddListener(() => SceneManager.LoadScene(minigame.minigameEntryPoint));
|
||||
button.onClick.AddListener(() => SceneManager.LoadScene("Common/Scenes/InfoMinigame"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -762,7 +762,7 @@ MonoBehaviour:
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument: CoursesScreen
|
||||
m_StringArgument: Common/Scenes/InfoCourse
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!114 &414055545
|
||||
|
||||
@@ -13,9 +13,9 @@ MonoBehaviour:
|
||||
m_Name: Fingerspelling
|
||||
m_EditorClassIdentifier:
|
||||
index: 0
|
||||
title: Fingerspelling
|
||||
description: Learn the basics of fingerspelling
|
||||
thumbnail: {fileID: 21300000, guid: f2344cd67769733ceb363a41e1d88a65, type: 3}
|
||||
title: Het handalfabet
|
||||
description: In deze les leer je het vingeralfabet of handalfabet. Van A tot Z
|
||||
thumbnail: {fileID: 21300000, guid: 1410d7d3db0161d13af116b0c4cb23c2, type: 3}
|
||||
learnables:
|
||||
- name: A
|
||||
image: {fileID: 21300000, guid: 7ff2526af24167b4083dab0d9fd486ea, type: 3}
|
||||
|
||||
@@ -200,7 +200,7 @@ PrefabInstance:
|
||||
m_Modifications:
|
||||
- target: {fileID: 8299246693487308512, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_StringArgument
|
||||
value: Common/Scenes/StartScreen
|
||||
value: Common/Scenes/InfoMinigame
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8299246693487308514, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_Name
|
||||
|
||||
@@ -14,6 +14,10 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
index: 0
|
||||
title: Spelling Bee
|
||||
description: A simple spelling minigame
|
||||
description: In deze minigame krijg je verschillende woorden voorgeschoteld die
|
||||
je zo snel mogelijk moet spellen met behulp van het vingeralfabet
|
||||
thumbnail: {fileID: 21300000, guid: d99bb2dc44e35344fa358208a01c06c4, type: 3}
|
||||
minigameEntryPoint: SpellingBee/Scenes/ThemeSelection
|
||||
controls: Je begint dit spel met 5 seconden tijd, voor elk juist antwoord krijg
|
||||
je extra tijd. Hoe sneller je het spel uitspeelt, hoe meer punten je scoort.
|
||||
Verloopt de timer, dan heb je het spelletje verloren
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"currentUserIndex":0,"storedUsers":[{"username":"testkonijn","avatar":{"instanceID":22348},"playtime":0.0,"courses":[],"minigames":[{"entries":[{"key":"minigameIndex","bytes":[0,1,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,12,2,0,0,0,70,65,115,115,101,109,98,108,121,45,67,83,104,97,114,112,44,32,86,101,114,115,105,111,110,61,48,46,48,46,48,46,48,44,32,67,117,108,116,117,114,101,61,110,101,117,116,114,97,108,44,32,80,117,98,108,105,99,75,101,121,84,111,107,101,110,61,110,117,108,108,5,1,0,0,0,13,77,105,110,105,103,97,109,101,73,110,100,101,120,1,0,0,0,7,118,97,108,117,101,95,95,0,8,2,0,0,0,0,0,0,0,11]},{"key":"highscore","bytes":[0,1,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,4,1,0,0,0,12,83,121,115,116,101,109,46,73,110,116,51,50,1,0,0,0,7,109,95,118,97,108,117,101,0,8,0,0,0,0,11]},{"key":"scores","bytes":[0,1,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,12,2,0,0,0,70,65,115,115,101,109,98,108,121,45,67,83,104,97,114,112,44,32,86,101,114,115,105,111,110,61,48,46,48,46,48,46,48,44,32,67,117,108,116,117,114,101,61,110,101,117,116,114,97,108,44,32,80,117,98,108,105,99,75,101,121,84,111,107,101,110,61,110,117,108,108,4,1,0,0,0,129,1,83,121,115,116,101,109,46,67,111,108,108,101,99,116,105,111,110,115,46,71,101,110,101,114,105,99,46,76,105,115,116,96,49,91,91,71,97,109,101,67,111,110,116,114,111,108,108,101,114,43,83,99,111,114,101,44,32,65,115,115,101,109,98,108,121,45,67,83,104,97,114,112,44,32,86,101,114,115,105,111,110,61,48,46,48,46,48,46,48,44,32,67,117,108,116,117,114,101,61,110,101,117,116,114,97,108,44,32,80,117,98,108,105,99,75,101,121,84,111,107,101,110,61,110,117,108,108,93,93,3,0,0,0,6,95,105,116,101,109,115,5,95,115,105,122,101,8,95,118,101,114,115,105,111,110,4,0,0,22,71,97,109,101,67,111,110,116,114,111,108,108,101,114,43,83,99,111,114,101,91,93,2,0,0,0,8,8,9,3,0,0,0,10,0,0,0,10,0,0,0,7,3,0,0,0,0,1,0,0,0,10,0,0,0,4,20,71,97,109,101,67,111,110,116,114,111,108,108,101,114,43,83,99,111,114,101,2,0,0,0,9,4,0,0,0,9,5,0,0,0,9,6,0,0,0,9,7,0,0,0,9,8,0,0,0,9,9,0,0,0,9,10,0,0,0,9,11,0,0,0,9,12,0,0,0,9,13,0,0,0,5,4,0,0,0,20,71,97,109,101,67,111,110,116,114,111,108,108,101,114,43,83,99,111,114,101,2,0,0,0,10,115,99,111,114,101,86,97,108,117,101,4,116,105,109,101,0,1,8,2,0,0,0,153,0,0,0,6,14,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,53,58,51,56,58,53,54,1,5,0,0,0,4,0,0,0,17,0,0,0,6,15,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,53,58,51,57,58,53,48,1,6,0,0,0,4,0,0,0,16,0,0,0,6,16,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,55,58,53,51,58,50,50,1,7,0,0,0,4,0,0,0,14,0,0,0,6,17,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,55,58,53,49,58,51,49,1,8,0,0,0,4,0,0,0,12,0,0,0,6,18,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,55,58,50,55,58,48,55,1,9,0,0,0,4,0,0,0,11,0,0,0,6,19,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,53,58,51,51,58,53,48,1,10,0,0,0,4,0,0,0,11,0,0,0,6,20,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,54,58,50,49,58,52,55,1,11,0,0,0,4,0,0,0,11,0,0,0,6,21,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,55,58,51,54,58,50,56,1,12,0,0,0,4,0,0,0,9,0,0,0,6,22,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,55,58,51,48,58,49,56,1,13,0,0,0,4,0,0,0,8,0,0,0,6,23,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,54,58,50,49,58,50,54,11]}]}]}]}
|
||||
{"currentUserIndex":0,"storedUsers":[{"username":"testkonijn","avatar":{"instanceID":0},"playtime":0.0,"courses":[{"entries":[{"key":"courseIndex","bytes":[0,1,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,12,2,0,0,0,70,65,115,115,101,109,98,108,121,45,67,83,104,97,114,112,44,32,86,101,114,115,105,111,110,61,48,46,48,46,48,46,48,44,32,67,117,108,116,117,114,101,61,110,101,117,116,114,97,108,44,32,80,117,98,108,105,99,75,101,121,84,111,107,101,110,61,110,117,108,108,5,1,0,0,0,11,67,111,117,114,115,101,73,110,100,101,120,1,0,0,0,7,118,97,108,117,101,95,95,0,8,2,0,0,0,0,0,0,0,11]},{"key":"courseProgress","bytes":[0,1,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,4,1,0,0,0,13,83,121,115,116,101,109,46,83,105,110,103,108,101,1,0,0,0,7,109,95,118,97,108,117,101,0,11,205,204,76,62,11]}]}],"minigames":[{"entries":[{"key":"minigameIndex","bytes":[0,1,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,12,2,0,0,0,70,65,115,115,101,109,98,108,121,45,67,83,104,97,114,112,44,32,86,101,114,115,105,111,110,61,48,46,48,46,48,46,48,44,32,67,117,108,116,117,114,101,61,110,101,117,116,114,97,108,44,32,80,117,98,108,105,99,75,101,121,84,111,107,101,110,61,110,117,108,108,5,1,0,0,0,13,77,105,110,105,103,97,109,101,73,110,100,101,120,1,0,0,0,7,118,97,108,117,101,95,95,0,8,2,0,0,0,0,0,0,0,11]},{"key":"highscore","bytes":[0,1,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,4,1,0,0,0,12,83,121,115,116,101,109,46,73,110,116,51,50,1,0,0,0,7,109,95,118,97,108,117,101,0,8,0,0,0,0,11]},{"key":"scores","bytes":[0,1,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,12,2,0,0,0,70,65,115,115,101,109,98,108,121,45,67,83,104,97,114,112,44,32,86,101,114,115,105,111,110,61,48,46,48,46,48,46,48,44,32,67,117,108,116,117,114,101,61,110,101,117,116,114,97,108,44,32,80,117,98,108,105,99,75,101,121,84,111,107,101,110,61,110,117,108,108,4,1,0,0,0,129,1,83,121,115,116,101,109,46,67,111,108,108,101,99,116,105,111,110,115,46,71,101,110,101,114,105,99,46,76,105,115,116,96,49,91,91,71,97,109,101,67,111,110,116,114,111,108,108,101,114,43,83,99,111,114,101,44,32,65,115,115,101,109,98,108,121,45,67,83,104,97,114,112,44,32,86,101,114,115,105,111,110,61,48,46,48,46,48,46,48,44,32,67,117,108,116,117,114,101,61,110,101,117,116,114,97,108,44,32,80,117,98,108,105,99,75,101,121,84,111,107,101,110,61,110,117,108,108,93,93,3,0,0,0,6,95,105,116,101,109,115,5,95,115,105,122,101,8,95,118,101,114,115,105,111,110,4,0,0,22,71,97,109,101,67,111,110,116,114,111,108,108,101,114,43,83,99,111,114,101,91,93,2,0,0,0,8,8,9,3,0,0,0,10,0,0,0,10,0,0,0,7,3,0,0,0,0,1,0,0,0,10,0,0,0,4,20,71,97,109,101,67,111,110,116,114,111,108,108,101,114,43,83,99,111,114,101,2,0,0,0,9,4,0,0,0,9,5,0,0,0,9,6,0,0,0,9,7,0,0,0,9,8,0,0,0,9,9,0,0,0,9,10,0,0,0,9,11,0,0,0,9,12,0,0,0,9,13,0,0,0,5,4,0,0,0,20,71,97,109,101,67,111,110,116,114,111,108,108,101,114,43,83,99,111,114,101,2,0,0,0,10,115,99,111,114,101,86,97,108,117,101,4,116,105,109,101,0,1,8,2,0,0,0,153,0,0,0,6,14,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,53,58,51,56,58,53,54,1,5,0,0,0,4,0,0,0,17,0,0,0,6,15,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,53,58,51,57,58,53,48,1,6,0,0,0,4,0,0,0,16,0,0,0,6,16,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,55,58,53,51,58,50,50,1,7,0,0,0,4,0,0,0,14,0,0,0,6,17,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,55,58,53,49,58,51,49,1,8,0,0,0,4,0,0,0,12,0,0,0,6,18,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,55,58,50,55,58,48,55,1,9,0,0,0,4,0,0,0,11,0,0,0,6,19,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,53,58,51,51,58,53,48,1,10,0,0,0,4,0,0,0,11,0,0,0,6,20,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,54,58,50,49,58,52,55,1,11,0,0,0,4,0,0,0,11,0,0,0,6,21,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,55,58,51,54,58,50,56,1,12,0,0,0,4,0,0,0,9,0,0,0,6,22,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,55,58,51,48,58,49,56,1,13,0,0,0,4,0,0,0,8,0,0,0,6,23,0,0,0,19,49,48,47,48,51,47,50,48,50,51,32,49,54,58,50,49,58,50,54,11]}]}]}]}
|
||||
@@ -32,6 +32,12 @@ EditorBuildSettings:
|
||||
- enabled: 1
|
||||
path: Assets/SpellingBee/Scenes/Game.unity
|
||||
guid: 652195ae9a0ff3ad18f6338db6a909bd
|
||||
- enabled: 1
|
||||
path: Assets/Common/Scenes/InfoMinigame.unity
|
||||
guid: 8e27404f21454dc4583f76b4c7df0c30
|
||||
- enabled: 1
|
||||
path: Assets/Common/Scenes/InfoCourse.unity
|
||||
guid: 5ff44b09f5858a64692f58938fd6d2ff
|
||||
- enabled: 1
|
||||
path: Assets/SpellingBee/Scenes/ThemeSelection.unity
|
||||
guid: 2dfa1265c9d65014c90941ac4240a977
|
||||
|
||||
Reference in New Issue
Block a user