Compare commits
21 Commits
v0.5
...
WES-81-jus
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cf605ab851 | ||
|
|
666815db22 | ||
|
|
b0ccda3ab5 | ||
|
|
16b13122c2 | ||
|
|
4fdf52b7b1 | ||
|
|
39618ab75c | ||
|
|
d81a04ff2a | ||
|
|
5e26970bad | ||
|
|
f6e6afe340 | ||
|
|
08cccd27b5 | ||
|
|
472d6a2409 | ||
|
|
6ea255dc23 | ||
|
|
96fb3c89c3 | ||
|
|
dfc69ddd76 | ||
|
|
59d69f7412 | ||
|
|
a267301ab6 | ||
|
|
94ec7e0359 | ||
|
|
0c795b09bc | ||
|
|
8501edb03a | ||
|
|
cef72508cc | ||
|
|
17abca46ea |
22
.drone.yml
@@ -36,11 +36,12 @@ steps:
|
||||
- name: unity-builds
|
||||
image: docker.io/library/unity-runner:0.1
|
||||
commands:
|
||||
- /opt/unity/editors/2021.3.19f1/Editor/Unity -batchmode -nographics -projectPath . -buildWindowsPlayer ./wesign-builds/WeSign-Windows.exe -quit --headless || true
|
||||
- mkdir -p ./wesign-builds/{tmp,WeSign-Windows,WeSign-Linux,WeSign-MacOS}
|
||||
- /opt/unity/editors/2021.3.19f1/Editor/Unity -batchmode -nographics -projectPath . -buildWindowsPlayer ./wesign-builds/tmp/WeSign-Windows.exe -quit --headless || true
|
||||
- chmod 777 -R .
|
||||
- /opt/unity/editors/2021.3.19f1/Editor/Unity -batchmode -nographics -projectPath . -buildWindowsPlayer ./wesign-builds/WeSign-Windows.exe -quit --headless
|
||||
- /opt/unity/editors/2021.3.19f1/Editor/Unity -batchmode -nographics -projectPath . -buildLinux64Player ./wesign-builds/WeSign-Linux -quit --headless
|
||||
- /opt/unity/editors/2021.3.19f1/Editor/Unity -batchmode -nographics -projectPath . -buildOSXUniversalPlayer ./wesign-builds/WeSign-MacOS.app -quit --headless
|
||||
- /opt/unity/editors/2021.3.19f1/Editor/Unity -batchmode -nographics -projectPath . -buildWindowsPlayer ./wesign-builds/WeSign-Windows/WeSign.exe -quit --headless
|
||||
- /opt/unity/editors/2021.3.19f1/Editor/Unity -batchmode -nographics -projectPath . -buildLinux64Player ./wesign-builds/WeSign-Linux/WeSign -quit --headless
|
||||
- /opt/unity/editors/2021.3.19f1/Editor/Unity -batchmode -nographics -projectPath . -buildOSXUniversalPlayer ./wesign-builds/WeSign-MacOS/WeSign.app -quit --headless
|
||||
- name: commit-files
|
||||
image: alpine/git
|
||||
environment:
|
||||
@@ -51,9 +52,14 @@ steps:
|
||||
commands:
|
||||
- git config --global user.name "DroneCI"
|
||||
- git config --global user.email "droneci@wesign.com"
|
||||
- ls ./wesign-builds
|
||||
- git add -f ./wesign-builds/WeSign-Windows.exe
|
||||
- git add -f ./wesign-builds/WeSign-Linux
|
||||
- git add -f ./wesign-builds/WeSign-MacOS.app
|
||||
|
||||
- zip -r ./wesign-builds/WeSign-Windows.zip ./wesign-builds/WeSign-Windows
|
||||
- zip -r ./wesign-builds/WeSign-MacOS.zip ./wesign-builds/WeSign-MacOS
|
||||
- zip -r ./wesign-builds/WeSign-Linux.zip ./wesign-builds/WeSign-Linux
|
||||
|
||||
- git add ./wesign-builds/WeSign-Windows.zip
|
||||
- git add ./wesign-builds/WeSign-MacOS.zip
|
||||
- git add ./wesign-builds/WeSign-Linux.zip
|
||||
|
||||
- git commit -m "Add build files [skip ci]"
|
||||
- git push -f https://oauth2:ixKiNbp48zzmP5PF-epo@gitlab.ilabt.imec.be/wesign/unity-application/
|
||||
|
||||
@@ -1097,7 +1097,6 @@ GameObject:
|
||||
- component: {fileID: 1143249627}
|
||||
- component: {fileID: 1143249626}
|
||||
- component: {fileID: 1143249625}
|
||||
- component: {fileID: 1143249628}
|
||||
m_Layer: 5
|
||||
m_Name: Button (1)
|
||||
m_TagString: Untagged
|
||||
@@ -1170,10 +1169,10 @@ MonoBehaviour:
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1143249628}
|
||||
m_TargetAssemblyTypeName: ChangeSceneOnClick, Assembly-CSharp
|
||||
m_MethodName: LoadScene
|
||||
m_Mode: 5
|
||||
- m_Target: {fileID: 906197780}
|
||||
m_TargetAssemblyTypeName: ChangeUserScreen, Assembly-CSharp
|
||||
m_MethodName: GotoUserCreation
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
@@ -1220,18 +1219,6 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1143249623}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1143249628
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1143249623}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 949ba4da8595d52aebc98e6f9b6a405e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &1229328479
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
17
Assets/Accounts/Scripts/AccountsScripts.asmdef
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "AccountsScripts",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:6055be8ebefd69e48b49212b09b47b2f",
|
||||
"GUID:df9d7b70293a2e14d9d3a018c3956f7a"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b3d66002fb543bf3fa03c11006f8cb3a
|
||||
guid: 1631ed2680c61245b8211d943c1639a8
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
@@ -1,9 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
/// <summary>
|
||||
/// ChangeUserScreen scene manager
|
||||
/// </summary>
|
||||
public class ChangeUserScreen : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
@@ -58,12 +60,7 @@ public class ChangeUserScreen : MonoBehaviour
|
||||
// Set background color
|
||||
background.color = i == currentUserIndex ? Color.blue : Color.gray;
|
||||
// Find correct component for setting the sprite
|
||||
foreach (Image img in background.GetComponentsInChildren<Image>())
|
||||
if (img != background)
|
||||
{
|
||||
img.sprite = user.avatar;
|
||||
break;
|
||||
}
|
||||
instance.transform.Find("Avatar").GetComponent<Image>().sprite = user.avatar;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,6 +82,14 @@ public class ChangeUserScreen : MonoBehaviour
|
||||
{
|
||||
userList.ChangeCurrentUser(currentUserIndex);
|
||||
userList.Save();
|
||||
SceneManager.LoadScene("Common/Scenes/StartScreen");
|
||||
SystemController.GetInstance().BackToPreviousScene();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Callback to load the UserCreationScreen scene
|
||||
/// </summary>
|
||||
public void GotoUserCreation()
|
||||
{
|
||||
SystemController.GetInstance().LoadNextScene("Accounts/Scenes/UserCreationScreen");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,6 @@ public class Progress
|
||||
}
|
||||
}
|
||||
|
||||
// Get the value of type `T` belonging to `key`
|
||||
/// <summary>
|
||||
/// Get the data object of a certain key
|
||||
/// </summary>
|
||||
|
||||
104
Assets/Accounts/Scripts/SystemController.cs
Normal file
@@ -0,0 +1,104 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
/// <summary>
|
||||
/// SystemController singleton
|
||||
/// </summary>
|
||||
public class SystemController
|
||||
{
|
||||
/// <summary>
|
||||
/// The instance controlling the singleton
|
||||
/// </summary>
|
||||
private static SystemController instance = null;
|
||||
|
||||
/// <summary>
|
||||
/// Stack of the loaded scenes, used to easily go back to previous scenes
|
||||
/// </summary>
|
||||
private Stack<int> sceneStack = new Stack<int>();
|
||||
|
||||
/// <summary>
|
||||
/// Get the instance loaded by the singleton
|
||||
/// </summary>
|
||||
/// <returns>SystemController instance</returns>
|
||||
public static SystemController GetInstance()
|
||||
{
|
||||
// Create a new instance if non exists
|
||||
if (instance == null)
|
||||
{
|
||||
instance = new SystemController();
|
||||
instance.sceneStack.Push(SceneManager.GetActiveScene().buildIndex);
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load the scene and push on the stack
|
||||
/// </summary>
|
||||
/// <param name="scenePath">Path of the scene</param>
|
||||
public void LoadNextScene(string scenePath)
|
||||
{
|
||||
LoadNextScene(SceneUtility.GetBuildIndexByScenePath(scenePath));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load the scene and push on the stack
|
||||
/// </summary>
|
||||
/// <param name="sceneIndex">Buildindex of the scene</param>
|
||||
public void LoadNextScene(int sceneIndex)
|
||||
{
|
||||
sceneStack.Push(sceneIndex);
|
||||
SceneManager.LoadScene(sceneIndex);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Swap the current scene with the new scene on the stack
|
||||
/// </summary>
|
||||
/// <param name="scenePath">Path of the scene</param>
|
||||
public void SwapScene(string scenePath)
|
||||
{
|
||||
SwapScene(SceneUtility.GetBuildIndexByScenePath(scenePath));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Swap the current scene with the new scene on the stack
|
||||
/// </summary>
|
||||
/// <param name="sceneIndex">Buildindex of the scene</param>
|
||||
public void SwapScene(int sceneIndex)
|
||||
{
|
||||
sceneStack.Pop();
|
||||
LoadNextScene(sceneIndex);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Go back to the previous scene and unload the current scene
|
||||
/// </summary>
|
||||
public void BackToPreviousScene()
|
||||
{
|
||||
sceneStack.Pop();
|
||||
|
||||
if (sceneStack.Count > 0) SceneManager.LoadScene(sceneStack.Peek());
|
||||
else Application.Quit();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Go back to a specific scene, unloading all the scenes on the way
|
||||
/// </summary>
|
||||
/// <param name="scenePath">Path of the scene</param>
|
||||
public void BackToScene(string scenePath)
|
||||
{
|
||||
BackToScene(SceneUtility.GetBuildIndexByScenePath(scenePath));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Go back to a specific scene, unloading all the scene on the way
|
||||
/// </summary>
|
||||
/// <param name="sceneIndex">Buildindex of the scene</param>
|
||||
public void BackToScene(int sceneIndex)
|
||||
{
|
||||
while (0 < sceneStack.Count && sceneStack.Peek() != sceneIndex) sceneStack.Pop();
|
||||
|
||||
if (sceneStack.Count > 0) SceneManager.LoadScene(sceneStack.Peek());
|
||||
else Application.Quit();
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 949ba4da8595d52aebc98e6f9b6a405e
|
||||
guid: bf5ea73aa43049e45a0ad926db15f315
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
@@ -2,7 +2,6 @@ using System.Collections.Generic;
|
||||
using System.Text.RegularExpressions;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
/// <summary>
|
||||
@@ -80,12 +79,7 @@ public class UserCreationScreen : MonoBehaviour
|
||||
// Set background color
|
||||
background.color = selectedAvatar == i ? Color.blue : Color.gray;
|
||||
// Find correct component for setting the sprite
|
||||
foreach (Image img in background.GetComponentsInChildren<Image>())
|
||||
if (img != background)
|
||||
{
|
||||
img.sprite = sprites[i];
|
||||
break;
|
||||
}
|
||||
instance.transform.Find("Image").GetComponent<Image>().sprite = sprites[i];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,8 +117,7 @@ public class UserCreationScreen : MonoBehaviour
|
||||
{
|
||||
// Create a new entry in the UserList ScriptableObject
|
||||
users.ChangeCurrentUser(users.CreateAndAddNewUser(username, sprites[selectedAvatar]));
|
||||
// TODO: change scene, for now just change to StartScreen
|
||||
SceneManager.LoadScene("Common/Scenes/StartScreen");
|
||||
SystemController.GetInstance().BackToPreviousScene();
|
||||
}
|
||||
// Warn user that username already exists
|
||||
else
|
||||
|
||||
27
Assets/Accounts/Tests/AccountsTests.asmdef
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "AccountsTests",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"UnityEngine.TestRunner",
|
||||
"UnityEditor.TestRunner",
|
||||
"AccountsScripts",
|
||||
"InterfacesScripts"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": true,
|
||||
"precompiledReferences": [
|
||||
"nunit.framework.dll",
|
||||
"nunit.framework.dll"
|
||||
],
|
||||
"autoReferenced": false,
|
||||
"defineConstraints": [
|
||||
"UNITY_INCLUDE_TESTS",
|
||||
"UNITY_INCLUDE_TESTS"
|
||||
],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
7
Assets/Accounts/Tests/AccountsTests.asmdef.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8500f5aede7627729bd8c97b15e541c4
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,3 +1,4 @@
|
||||
using NUnit.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
@@ -90,6 +91,7 @@ public class TestProgress : MonoBehaviour
|
||||
/// <summary>
|
||||
/// Test for creation of a new progress
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestNewProgress()
|
||||
{
|
||||
Progress progress = new Progress();
|
||||
@@ -99,6 +101,7 @@ public class TestProgress : MonoBehaviour
|
||||
/// <summary>
|
||||
/// Test whether invalid data will not be added
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestProgressAddInvalidData()
|
||||
{
|
||||
Progress progress = new Progress();
|
||||
@@ -108,6 +111,7 @@ public class TestProgress : MonoBehaviour
|
||||
/// <summary>
|
||||
/// Test whether a duplicated key will be added
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestProgressAddDuplicateKey()
|
||||
{
|
||||
Progress progress = new Progress();
|
||||
@@ -118,6 +122,7 @@ public class TestProgress : MonoBehaviour
|
||||
/// <summary>
|
||||
/// Test whether a <c>int</c> value can be added
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestProgressAddInt()
|
||||
{
|
||||
Progress progress = new Progress();
|
||||
@@ -127,6 +132,7 @@ public class TestProgress : MonoBehaviour
|
||||
/// <summary>
|
||||
/// Test whether a <c>double</c> value can be added
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestProgressAddDouble()
|
||||
{
|
||||
Progress progress = new Progress();
|
||||
@@ -136,6 +142,7 @@ public class TestProgress : MonoBehaviour
|
||||
/// <summary>
|
||||
/// Test whether a <c>string</c> value can be added
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestProgressAddString()
|
||||
{
|
||||
Progress progress = new Progress();
|
||||
@@ -145,6 +152,7 @@ public class TestProgress : MonoBehaviour
|
||||
/// <summary>
|
||||
/// Test whether a serializable struct can be added
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestProgressAddSerializableStruct()
|
||||
{
|
||||
Progress progress = new Progress();
|
||||
@@ -154,6 +162,7 @@ public class TestProgress : MonoBehaviour
|
||||
/// <summary>
|
||||
/// Test whether a non-serializable struct will throw an error
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestProgressAddNonSerializableStruct()
|
||||
{
|
||||
Debug.Assert(AddNonSerializableStruct());
|
||||
@@ -162,6 +171,7 @@ public class TestProgress : MonoBehaviour
|
||||
/// <summary>
|
||||
/// Test whether an invalid key will throw an error
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestProgressGetInvalidKey()
|
||||
{
|
||||
Debug.Assert(AccessInvalidKey());
|
||||
@@ -170,6 +180,7 @@ public class TestProgress : MonoBehaviour
|
||||
/// <summary>
|
||||
/// Test whether an invalid type will throw an error
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestProgressGetInvalidType()
|
||||
{
|
||||
Debug.Assert(AccessInvalidType());
|
||||
@@ -178,6 +189,7 @@ public class TestProgress : MonoBehaviour
|
||||
/// <summary>
|
||||
/// Test whether a value is correctly updated
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestProgressUpdate()
|
||||
{
|
||||
Progress progress = new Progress();
|
||||
@@ -190,6 +202,7 @@ public class TestProgress : MonoBehaviour
|
||||
/// <summary>
|
||||
/// Test whether a <c>int</c> value can be read
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestProgressGetInt()
|
||||
{
|
||||
Progress progress = new Progress();
|
||||
@@ -200,6 +213,7 @@ public class TestProgress : MonoBehaviour
|
||||
/// <summary>
|
||||
/// Test whether a <c>double</c> value can be read
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestProgressGetDouble()
|
||||
{
|
||||
Progress progress = new Progress();
|
||||
@@ -210,6 +224,7 @@ public class TestProgress : MonoBehaviour
|
||||
/// <summary>
|
||||
/// Test whether a <c>string</c> value can be read
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestProgressGetString()
|
||||
{
|
||||
Progress progress = new Progress();
|
||||
@@ -220,6 +235,7 @@ public class TestProgress : MonoBehaviour
|
||||
/// <summary>
|
||||
/// Test whether a serializable struct can be read
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestProgressGetStruct()
|
||||
{
|
||||
Progress progress = new Progress();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 62cf7906c5d34b94b984c3b13300b589
|
||||
guid: 7ce798c1224aa9c84b245bfc79f6e235
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3ec4b51665a3e7b499aa9c64fc9c7462
|
||||
guid: e88996685ebf2274ea70a64e08b7ddd7
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3ac4eb825ce7bf5499f083eaf34d5d4d
|
||||
guid: a5bf21dee022ed0489face1c734359de
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
3
Assets/Common/Interfaces/InterfacesScripts.asmdef
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"name": "InterfacesScripts"
|
||||
}
|
||||
7
Assets/Common/Interfaces/InterfacesScripts.asmdef.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: df9d7b70293a2e14d9d3a018c3956f7a
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 44a1fb926248fe240bed2d5c3820630b
|
||||
guid: 97282ff3b465e3c4682d218b3819b2e8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
12
Assets/Common/Interfaces/Score.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Score class TODO: Move to separate file
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class Score
|
||||
{
|
||||
public int scoreValue;
|
||||
public string time;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ae746f332e314e84c9df74b892c75d4d
|
||||
guid: 295706da5995d69468daf35ad5527089
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
@@ -148,7 +148,7 @@ GameObject:
|
||||
- component: {fileID: 8299246693487308515}
|
||||
- component: {fileID: 8299246693487308518}
|
||||
- component: {fileID: 8299246693487308512}
|
||||
- component: {fileID: 4155745828263815687}
|
||||
- component: {fileID: 4518652150503380115}
|
||||
m_Layer: 5
|
||||
m_Name: ButtonBack
|
||||
m_TagString: Untagged
|
||||
@@ -229,10 +229,10 @@ MonoBehaviour:
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 4155745828263815687}
|
||||
m_TargetAssemblyTypeName: ChangeSceneOnClick, Assembly-CSharp
|
||||
m_MethodName: LoadScene
|
||||
m_Mode: 5
|
||||
- m_Target: {fileID: 4518652150503380115}
|
||||
m_TargetAssemblyTypeName: BackButton, Assembly-CSharp
|
||||
m_MethodName: Back
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
@@ -241,7 +241,7 @@ MonoBehaviour:
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!114 &4155745828263815687
|
||||
--- !u!114 &4518652150503380115
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@@ -250,6 +250,6 @@ MonoBehaviour:
|
||||
m_GameObject: {fileID: 8299246693487308514}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 949ba4da8595d52aebc98e6f9b6a405e, type: 3}
|
||||
m_Script: {fileID: 11500000, guid: c3dd279b546423e4a8a1b28819a6c4a1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
|
||||
@@ -280,7 +280,6 @@ GameObject:
|
||||
- component: {fileID: 2823887524698191630}
|
||||
- component: {fileID: 2823887524698191625}
|
||||
- component: {fileID: 2823887524698191631}
|
||||
- component: {fileID: 7528776122952476157}
|
||||
- component: {fileID: 9192617418029337932}
|
||||
m_Layer: 5
|
||||
m_Name: ButtonUser
|
||||
@@ -376,18 +375,6 @@ MonoBehaviour:
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!114 &7528776122952476157
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2823887524698191629}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 949ba4da8595d52aebc98e6f9b6a405e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &9192617418029337932
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -285,7 +285,7 @@ GameObject:
|
||||
- component: {fileID: 1441088452393136283}
|
||||
- component: {fileID: 2691816296520610901}
|
||||
m_Layer: 5
|
||||
m_Name: Theme
|
||||
m_Name: Theme Item
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -189,7 +189,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &339096154
|
||||
GameObject:
|
||||
@@ -610,6 +610,7 @@ GameObject:
|
||||
- component: {fileID: 906197777}
|
||||
- component: {fileID: 906197779}
|
||||
- component: {fileID: 906197778}
|
||||
- component: {fileID: 906197780}
|
||||
m_Layer: 5
|
||||
m_Name: Panel
|
||||
m_TagString: Untagged
|
||||
@@ -636,6 +637,8 @@ RectTransform:
|
||||
- {fileID: 955994878}
|
||||
- {fileID: 507029407}
|
||||
- {fileID: 1135894725}
|
||||
- {fileID: 1774458253}
|
||||
- {fileID: 1804488336}
|
||||
m_Father: {fileID: 1768150806}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@@ -682,6 +685,24 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 906197776}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &906197780
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 906197776}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4ee87f3cdcccf934b82f9531c90f3457, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
courseList: {fileID: 11400000, guid: a7ab583094b7897468bbca9243717608, type: 2}
|
||||
userList: {fileID: 11400000, guid: 072bec636a40f7e4e93b0ac624a3bda2, type: 2}
|
||||
title: {fileID: 1168097236}
|
||||
description: {fileID: 1990031300}
|
||||
courseImage: {fileID: 755030131}
|
||||
progressBar: {fileID: 1135894726}
|
||||
--- !u!1 &955994877
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -767,10 +788,10 @@ MonoBehaviour:
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1122939481}
|
||||
m_TargetAssemblyTypeName: ChangeSceneOnClick, Assembly-CSharp
|
||||
m_MethodName: LoadScene
|
||||
m_Mode: 5
|
||||
- m_Target: {fileID: 906197780}
|
||||
m_TargetAssemblyTypeName: CourseActivityScreen, Assembly-CSharp
|
||||
m_MethodName: StartCourse
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
@@ -893,50 +914,6 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 991775367}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1122939480
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1122939482}
|
||||
- component: {fileID: 1122939481}
|
||||
m_Layer: 0
|
||||
m_Name: SceneControl
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1122939481
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1122939480}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 949ba4da8595d52aebc98e6f9b6a405e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!4 &1122939482
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1122939480}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1135894724
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1162,56 +1139,6 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1168097234}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1353360909
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1353360911}
|
||||
- component: {fileID: 1353360910}
|
||||
m_Layer: 0
|
||||
m_Name: InfoControl
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1353360910
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1353360909}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4ee87f3cdcccf934b82f9531c90f3457, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
list: {fileID: 11400000, guid: a7ab583094b7897468bbca9243717608, type: 2}
|
||||
userList: {fileID: 11400000, guid: 072bec636a40f7e4e93b0ac624a3bda2, type: 2}
|
||||
title: {fileID: 1168097236}
|
||||
description: {fileID: 1990031300}
|
||||
courseImage: {fileID: 755030131}
|
||||
slider: {fileID: 1135894726}
|
||||
--- !u!4 &1353360911
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1353360909}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 1023.27716, y: 547.95337, z: -1.0753342}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1768150802
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1305,10 +1232,8 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 906197777}
|
||||
- {fileID: 1804488336}
|
||||
- {fileID: 1774458253}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 3
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
@@ -1320,7 +1245,7 @@ PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 1768150806}
|
||||
m_TransformParent: {fileID: 906197777}
|
||||
m_Modifications:
|
||||
- target: {fileID: 8299246693487308512, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_StringArgument
|
||||
@@ -1340,7 +1265,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 2
|
||||
value: 7
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
@@ -1426,8 +1351,12 @@ PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 1768150806}
|
||||
m_TransformParent: {fileID: 906197777}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1935285004959629519, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2823887524698191629, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: ButtonUser
|
||||
@@ -1442,7 +1371,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2823887524698191630, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 1
|
||||
value: 8
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2823887524698191630, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
@@ -1516,6 +1445,26 @@ PrefabInstance:
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
|
||||
--- !u!224 &1804488336 stripped
|
||||
@@ -1535,7 +1484,7 @@ GameObject:
|
||||
- component: {fileID: 1903244526}
|
||||
- component: {fileID: 1903244525}
|
||||
m_Layer: 5
|
||||
m_Name: ControlsInfo
|
||||
m_Name: Controls
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -1204,6 +1204,10 @@ PrefabInstance:
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 906197777}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1935285004959629519, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2823887524698191629, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: ButtonUser
|
||||
@@ -1296,6 +1300,26 @@ PrefabInstance:
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_StringArgument
|
||||
value: Common/Scenes/StartScreen
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
|
||||
--- !u!224 &1782112234 stripped
|
||||
@@ -343,10 +343,10 @@ MonoBehaviour:
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1122939481}
|
||||
m_TargetAssemblyTypeName: ChangeSceneOnClick, Assembly-CSharp
|
||||
m_MethodName: LoadScene
|
||||
m_Mode: 5
|
||||
- m_Target: {fileID: 906197780}
|
||||
m_TargetAssemblyTypeName: MainMenuScreen, Assembly-CSharp
|
||||
m_MethodName: GotoMinigames
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
@@ -459,7 +459,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &519420028
|
||||
GameObject:
|
||||
@@ -1166,10 +1166,10 @@ MonoBehaviour:
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1122939481}
|
||||
m_TargetAssemblyTypeName: ChangeSceneOnClick, Assembly-CSharp
|
||||
m_MethodName: LoadScene
|
||||
m_Mode: 5
|
||||
- m_Target: {fileID: 906197780}
|
||||
m_TargetAssemblyTypeName: MainMenuScreen, Assembly-CSharp
|
||||
m_MethodName: GotoSettings
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
@@ -1292,50 +1292,6 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 991775367}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1122939480
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1122939482}
|
||||
- component: {fileID: 1122939481}
|
||||
m_Layer: 0
|
||||
m_Name: SceneControl
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1122939481
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1122939480}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 949ba4da8595d52aebc98e6f9b6a405e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!4 &1122939482
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1122939480}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1369063653
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1497,7 +1453,7 @@ MonoBehaviour:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 906197780}
|
||||
m_TargetAssemblyTypeName: StartScreenManager, Assembly-CSharp
|
||||
m_TargetAssemblyTypeName: MainMenuScreen, Assembly-CSharp
|
||||
m_MethodName: QuitApplication
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
@@ -1631,10 +1587,10 @@ MonoBehaviour:
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1122939481}
|
||||
m_TargetAssemblyTypeName: ChangeSceneOnClick, Assembly-CSharp
|
||||
m_MethodName: LoadScene
|
||||
m_Mode: 5
|
||||
- m_Target: {fileID: 906197780}
|
||||
m_TargetAssemblyTypeName: MainMenuScreen, Assembly-CSharp
|
||||
m_MethodName: GotoCourses
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
@@ -1851,7 +1807,7 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 906197777}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 3
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
@@ -189,7 +189,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &143992426
|
||||
PrefabInstance:
|
||||
@@ -198,6 +198,10 @@ PrefabInstance:
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 906197777}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1935285004959629519, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2823887524698191629, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: ButtonUser
|
||||
@@ -290,6 +294,26 @@ PrefabInstance:
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_StringArgument
|
||||
value: Common/Scenes/StartScreen
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4001770636160324653, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
|
||||
--- !u!224 &143992427 stripped
|
||||
@@ -297,59 +321,6 @@ RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 2823887524698191630, guid: 53b0d00ac817ebf43b61bea2d160dd66, type: 3}
|
||||
m_PrefabInstance: {fileID: 143992426}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &351832751
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 351832753}
|
||||
- component: {fileID: 351832752}
|
||||
m_Layer: 0
|
||||
m_Name: InfoControl
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &351832752
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 351832751}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 90de9a5c57c2189429073f8aadc9e9b7, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
list: {fileID: 11400000, guid: 51453f9b41bc72f468ba3e67ab622f8f, type: 2}
|
||||
title: {fileID: 1168097236}
|
||||
description: {fileID: 1990031300}
|
||||
gameImage: {fileID: 755030131}
|
||||
button: {fileID: 955994879}
|
||||
controls: {fileID: 915818721}
|
||||
userList: {fileID: 11400000, guid: 072bec636a40f7e4e93b0ac624a3bda2, type: 2}
|
||||
userContainer: {fileID: 507029407}
|
||||
prefab: {fileID: 381012861935775045, guid: 154c17a838d2896499bd76d28a584222, type: 3}
|
||||
--- !u!4 &351832753
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 351832751}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &507029406
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -363,7 +334,7 @@ GameObject:
|
||||
- component: {fileID: 507029408}
|
||||
- component: {fileID: 507029410}
|
||||
m_Layer: 5
|
||||
m_Name: HighScoresTitle
|
||||
m_Name: Highscores
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -681,6 +652,7 @@ GameObject:
|
||||
- component: {fileID: 906197777}
|
||||
- component: {fileID: 906197779}
|
||||
- component: {fileID: 906197778}
|
||||
- component: {fileID: 906197780}
|
||||
m_Layer: 5
|
||||
m_Name: Panel
|
||||
m_TagString: Untagged
|
||||
@@ -754,6 +726,27 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 906197776}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &906197780
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 906197776}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 90de9a5c57c2189429073f8aadc9e9b7, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
minigameList: {fileID: 11400000, guid: 51453f9b41bc72f468ba3e67ab622f8f, type: 2}
|
||||
title: {fileID: 1168097236}
|
||||
description: {fileID: 1990031300}
|
||||
gameImage: {fileID: 755030131}
|
||||
button: {fileID: 955994879}
|
||||
controls: {fileID: 915818721}
|
||||
userList: {fileID: 11400000, guid: 072bec636a40f7e4e93b0ac624a3bda2, type: 2}
|
||||
userContainer: {fileID: 507029407}
|
||||
prefab: {fileID: 381012861935775045, guid: 154c17a838d2896499bd76d28a584222, type: 3}
|
||||
--- !u!1 &915818719
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -766,7 +759,7 @@ GameObject:
|
||||
- component: {fileID: 915818722}
|
||||
- component: {fileID: 915818721}
|
||||
m_Layer: 5
|
||||
m_Name: ControlsInfo
|
||||
m_Name: Controls
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -902,7 +895,7 @@ GameObject:
|
||||
- component: {fileID: 955994880}
|
||||
- component: {fileID: 955994879}
|
||||
m_Layer: 5
|
||||
m_Name: PlayButton
|
||||
m_Name: Play Button
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -1088,50 +1081,6 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 991775367}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1122939480
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1122939482}
|
||||
- component: {fileID: 1122939481}
|
||||
m_Layer: 0
|
||||
m_Name: SceneControl
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1122939481
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1122939480}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 949ba4da8595d52aebc98e6f9b6a405e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!4 &1122939482
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1122939480}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1168097234
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1467,7 +1416,7 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 906197777}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 3
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
@@ -706,7 +706,7 @@ MonoBehaviour:
|
||||
m_GameObject: {fileID: 1768150802}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 68caaa5508a4d40448b47630ff86f035, type: 3}
|
||||
m_Script: {fileID: 11500000, guid: 30d9f9130bf1d414aaad006b2177bdea, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
themePrefab: {fileID: 1441088452393136277, guid: 67febbbd89041e243b4e201a9f8d91e9, type: 3}
|
||||
@@ -15,3 +15,4 @@ MonoBehaviour:
|
||||
currentMinigameIndex: 0
|
||||
minigames:
|
||||
- {fileID: 11400000, guid: 8a087d241d652634eb4f6352267ea7dc, type: 2}
|
||||
- {fileID: 11400000, guid: e726e0b93ea88465db7ee27605deb83f, type: 2}
|
||||
|
||||
15
Assets/Common/Scripts/BackButton.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// Script managing the default 'back'-button action
|
||||
/// </summary>
|
||||
public class BackButton : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// The default 'back'-button action: go back to the previous scene
|
||||
/// </summary>
|
||||
public void Back()
|
||||
{
|
||||
SystemController.GetInstance().BackToPreviousScene();
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a85f8bd9399680347b4be72850a56fcf
|
||||
guid: c3dd279b546423e4a8a1b28819a6c4a1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
@@ -1,12 +1,11 @@
|
||||
using System.Collections;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
/// <summary>
|
||||
/// Authorize and check for available webcam(s)
|
||||
/// </summary>
|
||||
public class WebcamAuthorization : MonoBehaviour
|
||||
public class BootScreen : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// UI Reference to the text object to display an error message
|
||||
@@ -24,7 +23,7 @@ public class WebcamAuthorization : MonoBehaviour
|
||||
{
|
||||
if (0 < WebCamTexture.devices.Length)
|
||||
{
|
||||
SceneManager.LoadScene("Common/Scenes/StartScreen");
|
||||
SystemController.GetInstance().SwapScene("Common/Scenes/MainMenuScreen");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1,35 +0,0 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
/// <summary>
|
||||
/// Class to handle scene loading callbacks
|
||||
/// </summary>
|
||||
public class ChangeSceneOnClick : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// Method used as callback for gameobject onClick events
|
||||
/// </summary>
|
||||
/// <param name="sceneName">The path to the new scene (<c>path == $"Assets/{sceneName}"</c>)</param>
|
||||
public void LoadScene(string sceneName)
|
||||
{
|
||||
SceneManager.LoadScene(sceneName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method used as callback for gameobject onClick events
|
||||
/// </summary>
|
||||
/// <param name="scene">Reference to a scene</param>
|
||||
public void LoadScene(Scene scene)
|
||||
{
|
||||
SceneManager.LoadScene(scene.buildIndex);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method used as callback from gameobject onClick events
|
||||
/// </summary>
|
||||
/// <param name="buildIndex">Build index of the scene to be loaded</param>
|
||||
public void LoadScene(int buildIndex)
|
||||
{
|
||||
SceneManager.LoadScene(buildIndex);
|
||||
}
|
||||
}
|
||||
19
Assets/Common/Scripts/CommonScripts.asmdef
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "CommonScripts",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:6055be8ebefd69e48b49212b09b47b2f",
|
||||
"GUID:63c63e721f65ebb7d871cb9ef49f4752",
|
||||
"GUID:1631ed2680c61245b8211d943c1639a8",
|
||||
"GUID:df9d7b70293a2e14d9d3a018c3956f7a"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
7
Assets/Common/Scripts/CommonScripts.asmdef.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3444c67d5a3a93e5a95a48906078c372
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,18 +1,16 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using TMPro; // For text
|
||||
|
||||
/// <summary>
|
||||
/// Manager infopage for the Courses
|
||||
/// </summary>
|
||||
public class InfoCourse : MonoBehaviour
|
||||
public class CourseActivityScreen : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// Reference to the courses
|
||||
/// </summary>
|
||||
public CourseList list;
|
||||
public CourseList courseList;
|
||||
// private float maxvalue; In case we want to change progress e.g. amount of words correct, then change maxvalue amount of words etc.
|
||||
|
||||
/// <summary>
|
||||
@@ -43,17 +41,15 @@ public class InfoCourse : MonoBehaviour
|
||||
/// <summary>
|
||||
/// Progress bar Display
|
||||
/// </summary>
|
||||
public Slider slider;
|
||||
|
||||
|
||||
// Start is called before the first frame update
|
||||
public Slider progressBar;
|
||||
|
||||
/// <summary>
|
||||
/// Sets the infopage for a given course
|
||||
/// </summary>
|
||||
void Start()
|
||||
{
|
||||
int index = list.currentCourseIndex;
|
||||
Course course = list.courses[index];
|
||||
int index = courseList.currentCourseIndex;
|
||||
Course course = courseList.courses[index];
|
||||
|
||||
title.text = course.title;
|
||||
description.text = course.description;
|
||||
@@ -63,9 +59,16 @@ public class InfoCourse : MonoBehaviour
|
||||
// Set progress
|
||||
progress = userList.GetCurrentUser().GetCourseProgress(course.index);
|
||||
if (progress != null)
|
||||
slider.value = progress.Get<float>("courseProgress");
|
||||
progressBar.value = progress.Get<float>("courseProgress");
|
||||
else
|
||||
slider.value = 0.0f;
|
||||
progressBar.value = 0.0f;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Callback to start the course
|
||||
/// </summary>
|
||||
public void StartCourse()
|
||||
{
|
||||
SystemController.GetInstance().LoadNextScene("Courses/Scenes/TemplateCourse");
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
/// <summary>
|
||||
@@ -68,6 +67,6 @@ public class CourseItem : MonoBehaviour
|
||||
slider.GetComponent<Slider>().value = progress;
|
||||
|
||||
// Add click functionality
|
||||
button.onClick.AddListener(() => SceneManager.LoadScene("Common/Scenes/InfoCourse"));
|
||||
button.onClick.AddListener(() => SystemController.GetInstance().LoadNextScene("Common/Scenes/CourseActivityScreen"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
/// <summary>
|
||||
/// ListCourseScreen scene manager
|
||||
/// </summary>
|
||||
public class CourseListManager : MonoBehaviour
|
||||
public class ListCoursesScreen : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// Reference to the course-list container object
|
||||
@@ -40,9 +39,8 @@ public class CourseListManager : MonoBehaviour
|
||||
/// <summary>
|
||||
/// Method used as callback for course item onClick events
|
||||
/// </summary>
|
||||
/// <param name="sceneName">The path to the new scene (<c>path == $"Assets/{sceneName}"</c>)</param>
|
||||
public void LoadScene(string sceneName)
|
||||
public void GotoCourseInfo()
|
||||
{
|
||||
SceneManager.LoadScene(sceneName);
|
||||
SystemController.GetInstance().LoadNextScene("Common/Scenes/CourseActivityScreen");
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,9 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
/// <summary>
|
||||
/// ListMinigameScreen scene manager
|
||||
/// </summary>
|
||||
public class MinigameListManager : MonoBehaviour
|
||||
public class ListMinigamesScreen : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// Reference to minigame-list container object
|
||||
@@ -43,6 +42,6 @@ public class MinigameListManager : MonoBehaviour
|
||||
/// <param name="sceneName">The path to the new scene (<c>path == $"Assets/{sceneName}"</c>)</param>
|
||||
public void LoadScene(string sceneName)
|
||||
{
|
||||
SceneManager.LoadScene(sceneName);
|
||||
SystemController.GetInstance().LoadNextScene(sceneName);
|
||||
}
|
||||
}
|
||||
57
Assets/Common/Scripts/MainMenuScreen.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// StartScreen scene manager
|
||||
/// </summary>
|
||||
public class MainMenuScreen : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// Referece to the userlist to check whether an user account is present
|
||||
/// </summary>
|
||||
public UserList userList;
|
||||
|
||||
/// <summary>
|
||||
/// Check on load whether a user is already present,
|
||||
/// if not load the UserCreationScreen scene so the user can create a new account
|
||||
/// </summary>
|
||||
void Awake()
|
||||
{
|
||||
if (!File.Exists(UserList.PATH) || userList.GetUsers().Count <= 0)
|
||||
{
|
||||
SystemController.GetInstance().LoadNextScene("Accounts/Scenes/UserCreationScreen");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Quit the application
|
||||
/// </summary>
|
||||
public void QuitApplication()
|
||||
{
|
||||
Application.Quit();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load the `CoursesMenuScreen` scene
|
||||
/// </summary>
|
||||
public void GotoCourses()
|
||||
{
|
||||
SystemController.GetInstance().LoadNextScene("Common/Scenes/CoursesMenuScreen");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load the `ListMinigamesScreen` scene
|
||||
/// </summary>
|
||||
public void GotoMinigames()
|
||||
{
|
||||
SystemController.GetInstance().LoadNextScene("Common/Scenes/ListMinigamesScreen");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load the `SettingsScreen` scene
|
||||
/// </summary>
|
||||
public void GotoSettings()
|
||||
{
|
||||
SystemController.GetInstance().LoadNextScene("Common/Scenes/SettingsScreen");
|
||||
}
|
||||
}
|
||||
@@ -21,6 +21,11 @@ public class Minigame : ScriptableObject
|
||||
/// </summary>
|
||||
public string description;
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not the game needs a theme to be selected
|
||||
/// </summary>
|
||||
public bool needsTheme;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the minigame thumbnail
|
||||
/// </summary>
|
||||
@@ -35,5 +40,4 @@ public class Minigame : ScriptableObject
|
||||
/// An explanation on how to play the game and score points
|
||||
/// </summary>
|
||||
public string controls;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,23 +1,19 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using TMPro;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
using static GameController;
|
||||
|
||||
/// <summary>
|
||||
/// Manager infopage for the Minigames
|
||||
/// </summary>
|
||||
public class InfoMinigame : MonoBehaviour
|
||||
public class MinigameActivityScreen : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// Reference to the Minigames
|
||||
/// </summary>
|
||||
public MinigameList list;
|
||||
public MinigameList minigameList;
|
||||
|
||||
/// <summary>
|
||||
/// Title Display
|
||||
@@ -44,8 +40,6 @@ public class InfoMinigame : MonoBehaviour
|
||||
/// </summary>
|
||||
public TMP_Text controls;
|
||||
|
||||
// Scores for each user
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the users
|
||||
/// </summary>
|
||||
@@ -66,7 +60,6 @@ public class InfoMinigame : MonoBehaviour
|
||||
/// </summary>
|
||||
public GameObject prefab;
|
||||
|
||||
// Start is called before the first frame update
|
||||
/// <summary>
|
||||
/// Sets the infopage for a given minigame
|
||||
/// </summary>
|
||||
@@ -82,17 +75,24 @@ public class InfoMinigame : MonoBehaviour
|
||||
private void GenerateContent()
|
||||
{
|
||||
// Get current minigame
|
||||
int index = list.currentMinigameIndex;
|
||||
Minigame minigame = list.minigames[index];
|
||||
|
||||
int index = minigameList.currentMinigameIndex;
|
||||
Minigame minigame = minigameList.minigames[index];
|
||||
|
||||
// Set main screen
|
||||
title.text = minigame.title;
|
||||
description.text = minigame.description;
|
||||
gameImage.sprite = minigame.thumbnail;
|
||||
controls.text = minigame.controls;
|
||||
|
||||
// Add click functionality
|
||||
button.onClick.AddListener(() => SceneManager.LoadScene(minigame.minigameEntryPoint));
|
||||
// Add click
|
||||
if (minigame.needsTheme)
|
||||
{
|
||||
button.onClick.AddListener(() => SystemController.GetInstance().LoadNextScene("Common/Scenes/ThemeSelectionScreen"));
|
||||
}
|
||||
else
|
||||
{
|
||||
button.onClick.AddListener(() => SystemController.GetInstance().LoadNextScene(minigame.minigameEntryPoint));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -104,8 +104,8 @@ public class InfoMinigame : MonoBehaviour
|
||||
private void GenerateHighScores()
|
||||
{
|
||||
// Get current minigame
|
||||
int index = list.currentMinigameIndex;
|
||||
Minigame minigame = list.minigames[index];
|
||||
int index = minigameList.currentMinigameIndex;
|
||||
Minigame minigame = minigameList.minigames[index];
|
||||
|
||||
List<Tuple<string, Sprite, Score>> allScores = new List<Tuple<string, Sprite, Score>>();
|
||||
foreach (User user in userList.GetUsers())
|
||||
@@ -137,7 +137,6 @@ public class InfoMinigame : MonoBehaviour
|
||||
instance.transform.Find("Title").GetComponent<TMP_Text>().text = username;
|
||||
instance.transform.Find("Avatar").GetComponent<Image>().sprite = sprite;
|
||||
instance.transform.Find("Score").GetComponent<TMP_Text>().text = score.scoreValue.ToString();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
/// <summary>
|
||||
@@ -47,6 +46,10 @@ public class MinigameItem : MonoBehaviour
|
||||
title.text = minigame.title;
|
||||
|
||||
// Add click functionality
|
||||
button.onClick.AddListener(() => SceneManager.LoadScene("Common/Scenes/InfoMinigame"));
|
||||
button.onClick.AddListener(() =>
|
||||
{
|
||||
PlayerPrefs.SetString("gamePath", minigame.minigameEntryPoint);
|
||||
SystemController.GetInstance().LoadNextScene("Common/Scenes/MinigameActivityScreen");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
/// <summary>
|
||||
/// StartScreen scene manager
|
||||
/// </summary>
|
||||
public class StartScreenManager : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// Referece to the userlist to check whether an user account is present
|
||||
/// </summary>
|
||||
public UserList userList;
|
||||
|
||||
/// <summary>
|
||||
/// Check on load whether a user is already present,
|
||||
/// if not load the UserCreationScreen scene so the user can create a new account
|
||||
/// </summary>
|
||||
void Awake()
|
||||
{
|
||||
if (!File.Exists(UserList.PATH) || userList.GetUsers().Count <= 0)
|
||||
{
|
||||
SceneManager.LoadScene("Accounts/Scenes/UserCreationScreen");
|
||||
}
|
||||
}
|
||||
|
||||
public void QuitApplication()
|
||||
{
|
||||
Application.Quit();
|
||||
}
|
||||
}
|
||||
36
Assets/Common/Scripts/ThemeLoader.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// JSON structure containing all themes/words
|
||||
/// </summary>
|
||||
[System.Serializable]
|
||||
public class ThemeList
|
||||
{
|
||||
public Theme[] themes;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Object representing part of the JSON containing word data
|
||||
/// </summary>
|
||||
[System.Serializable]
|
||||
public class Theme
|
||||
{
|
||||
public string name;
|
||||
public string description;
|
||||
public string[] words;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Loader of the themes-JSON
|
||||
/// </summary>
|
||||
public class ThemeLoader : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// Loads the JSON file containing all of the themes
|
||||
/// </summary>
|
||||
public static ThemeList LoadJson()
|
||||
{
|
||||
TextAsset themeJson = Resources.Load<TextAsset>("Common/words");
|
||||
return JsonUtility.FromJson<ThemeList>(themeJson.text);
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,24 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class ThemeSelectionController : MonoBehaviour
|
||||
/// <summary>
|
||||
/// ThemeSelectionScreen scene manager
|
||||
/// </summary>
|
||||
public class ThemeSelectionScreen : MonoBehaviour
|
||||
{
|
||||
[Header("Theme Selection")]
|
||||
// Theme prefab
|
||||
/// <summary>
|
||||
/// Theme prefab
|
||||
/// </summary>
|
||||
public GameObject themePrefab;
|
||||
// Reference to container holding all theme-buttons
|
||||
|
||||
/// <summary>
|
||||
/// Reference to container holding all theme-buttons
|
||||
/// </summary>
|
||||
public Transform themesContainer;
|
||||
|
||||
|
||||
public void Start()
|
||||
/// <summary>
|
||||
/// Start is called before the first frame update
|
||||
/// </summary>
|
||||
void Start()
|
||||
{
|
||||
// TODO: change to ScriptableObject
|
||||
ThemeList themeList = ThemeLoader.LoadJson();
|
||||
@@ -30,9 +38,13 @@ public class ThemeSelectionController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load the game with a specified theme
|
||||
/// </summary>
|
||||
/// <param name="clickedTheme">Name of the clicked theme</param>
|
||||
public void OnButtonClick(string clickedTheme)
|
||||
{
|
||||
PlayerPrefs.SetString("themeName", clickedTheme);
|
||||
SceneManager.LoadScene("Game");
|
||||
SystemController.GetInstance().SwapScene(PlayerPrefs.GetString("gamePath"));
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 74f8b297e568e071198f12d32c3f32c0
|
||||
guid: 30d9f9130bf1d414aaad006b2177bdea
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
@@ -1,6 +1,5 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
/// <summary>
|
||||
@@ -44,7 +43,7 @@ public class UserButton : MonoBehaviour
|
||||
/// </summary>
|
||||
public void OpenProgressCallback()
|
||||
{
|
||||
SceneManager.LoadScene("Accounts/Scenes/UserProgressScreen");
|
||||
SystemController.GetInstance().LoadNextScene("Accounts/Scenes/UserProgressScreen");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -52,7 +51,7 @@ public class UserButton : MonoBehaviour
|
||||
/// </summary>
|
||||
public void ChangeUserCallback()
|
||||
{
|
||||
SceneManager.LoadScene("Accounts/Scenes/ChangeUserScreen");
|
||||
SystemController.GetInstance().LoadNextScene("Accounts/Scenes/ChangeUserScreen");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -394,61 +394,6 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100123244}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &118887548
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 118887550}
|
||||
- component: {fileID: 118887549}
|
||||
m_Layer: 0
|
||||
m_Name: Button-controller
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &118887549
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 118887548}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ae746f332e314e84c9df74b892c75d4d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
player: {fileID: 993952931}
|
||||
button: {fileID: 1159630774}
|
||||
pauseSprite: {fileID: 21300000, guid: 43db869a07cf51f45a411b6e4a417743, type: 3}
|
||||
wordImage: {fileID: 2145235737}
|
||||
title: {fileID: 388014849}
|
||||
userList: {fileID: 11400000, guid: 072bec636a40f7e4e93b0ac624a3bda2, type: 2}
|
||||
courselist: {fileID: 11400000, guid: a7ab583094b7897468bbca9243717608, type: 2}
|
||||
ResultPanel: {fileID: 1383144366}
|
||||
CoursesButton: {fileID: 839294691}
|
||||
Webcam: {fileID: 1485779445}
|
||||
timeSpent: {fileID: 77614869}
|
||||
--- !u!4 &118887550
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 118887548}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 5
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &301088547
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -460,6 +405,7 @@ GameObject:
|
||||
- component: {fileID: 301088548}
|
||||
- component: {fileID: 301088550}
|
||||
- component: {fileID: 301088549}
|
||||
- component: {fileID: 301088551}
|
||||
m_Layer: 5
|
||||
m_Name: Panel
|
||||
m_TagString: Untagged
|
||||
@@ -480,12 +426,12 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 2145235736}
|
||||
- {fileID: 414055543}
|
||||
- {fileID: 1493108463}
|
||||
- {fileID: 378145455}
|
||||
- {fileID: 1343151409}
|
||||
- {fileID: 1813638489}
|
||||
- {fileID: 409590586}
|
||||
- {fileID: 1335886460}
|
||||
m_Father: {fileID: 1559094126}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@@ -532,6 +478,32 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 301088547}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &301088551
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 301088547}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6b3f784c065813a4a8364b1299284816, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
webcamDisplay: {fileID: 378145456}
|
||||
feedback: {fileID: 409590587}
|
||||
feedbackPopup: {fileID: 1374011069}
|
||||
dynamic: {fileID: 1523390682}
|
||||
player: {fileID: 993952931}
|
||||
button: {fileID: 1159630774}
|
||||
pauseSprite: {fileID: 21300000, guid: 43db869a07cf51f45a411b6e4a417743, type: 3}
|
||||
wordImage: {fileID: 2145235737}
|
||||
title: {fileID: 388014849}
|
||||
userList: {fileID: 11400000, guid: 072bec636a40f7e4e93b0ac624a3bda2, type: 2}
|
||||
courselist: {fileID: 11400000, guid: a7ab583094b7897468bbca9243717608, type: 2}
|
||||
ResultPanel: {fileID: 1383144366}
|
||||
CoursesButton: {fileID: 839294691}
|
||||
timeSpent: {fileID: 77614869}
|
||||
--- !u!1 &361280475
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -749,7 +721,7 @@ GameObject:
|
||||
- component: {fileID: 378145457}
|
||||
- component: {fileID: 378145456}
|
||||
m_Layer: 5
|
||||
m_Name: Webcam-bg
|
||||
m_Name: Webcam Background
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -768,7 +740,7 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 301088548}
|
||||
m_RootOrder: 3
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
@@ -822,7 +794,7 @@ GameObject:
|
||||
- component: {fileID: 388014850}
|
||||
- component: {fileID: 388014849}
|
||||
m_Layer: 5
|
||||
m_Name: title
|
||||
m_Name: Title
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -960,7 +932,7 @@ GameObject:
|
||||
- component: {fileID: 409590588}
|
||||
- component: {fileID: 409590587}
|
||||
m_Layer: 5
|
||||
m_Name: Test-feedback-button
|
||||
m_Name: Feedback Button
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -980,7 +952,7 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 1138468890}
|
||||
m_Father: {fileID: 301088548}
|
||||
m_RootOrder: 6
|
||||
m_RootOrder: 5
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
@@ -1031,9 +1003,9 @@ MonoBehaviour:
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1485779445}
|
||||
m_TargetAssemblyTypeName: Webcam, Assembly-CSharp
|
||||
m_MethodName: Show_feedback
|
||||
- m_Target: {fileID: 301088551}
|
||||
m_TargetAssemblyTypeName: TemplateCourse, Assembly-CSharp
|
||||
m_MethodName: ShowFeedback
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
@@ -1081,140 +1053,6 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 409590585}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &414055542
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 414055543}
|
||||
- component: {fileID: 414055546}
|
||||
- component: {fileID: 414055545}
|
||||
- component: {fileID: 414055544}
|
||||
m_Layer: 5
|
||||
m_Name: Courses
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &414055543
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 414055542}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1785847568}
|
||||
m_Father: {fileID: 301088548}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 234, y: -60}
|
||||
m_SizeDelta: {x: 480.0704, y: 99.1845}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &414055544
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 414055542}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 414055545}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1485779445}
|
||||
m_TargetAssemblyTypeName: Webcam, Assembly-CSharp
|
||||
m_MethodName: LoadScene
|
||||
m_Mode: 5
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument: CoursesScreen
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!114 &414055545
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 414055542}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0, g: 0, b: 0, a: 0}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 10917, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!222 &414055546
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 414055542}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &519420028
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1518,13 +1356,13 @@ MonoBehaviour:
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 0}
|
||||
m_TargetAssemblyTypeName:
|
||||
m_MethodName:
|
||||
- m_Target: {fileID: 301088551}
|
||||
m_TargetAssemblyTypeName: TemplateCourse, Assembly-CSharp
|
||||
m_MethodName: Back
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName:
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
@@ -2130,7 +1968,7 @@ MonoBehaviour:
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 118887549}
|
||||
- m_Target: {fileID: 0}
|
||||
m_TargetAssemblyTypeName: StartPause, Assembly-CSharp
|
||||
m_MethodName: Pause
|
||||
m_Mode: 1
|
||||
@@ -2256,6 +2094,120 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1300721216}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1001 &1335886459
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 301088548}
|
||||
m_Modifications:
|
||||
- target: {fileID: 8299246693487308512, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
|
||||
value:
|
||||
objectReference: {fileID: 301088551}
|
||||
- target: {fileID: 8299246693487308512, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
|
||||
value: Back
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8299246693487308512, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
|
||||
value: TemplateCourse, Assembly-CSharp
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8299246693487308514, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: ButtonBack
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 300
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 120
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
--- !u!224 &1335886460 stripped
|
||||
RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 8299246693487308515, guid: 3bccdf365a4fbea4d8fa1aa461d3dc5c, type: 3}
|
||||
m_PrefabInstance: {fileID: 1335886459}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &1343151408
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -2269,7 +2221,7 @@ GameObject:
|
||||
- component: {fileID: 1343151411}
|
||||
- component: {fileID: 1343151410}
|
||||
m_Layer: 5
|
||||
m_Name: Change-cam
|
||||
m_Name: Change Webcam Button
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -2289,7 +2241,7 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 1898926705}
|
||||
m_Father: {fileID: 301088548}
|
||||
m_RootOrder: 4
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
@@ -2340,8 +2292,8 @@ MonoBehaviour:
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1485779445}
|
||||
m_TargetAssemblyTypeName: Webcam, Assembly-CSharp
|
||||
- m_Target: {fileID: 301088551}
|
||||
m_TargetAssemblyTypeName: TemplateCourse, Assembly-CSharp
|
||||
m_MethodName: SwapCam
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
@@ -2402,7 +2354,7 @@ GameObject:
|
||||
- component: {fileID: 1374011072}
|
||||
- component: {fileID: 1374011071}
|
||||
m_Layer: 5
|
||||
m_Name: Panel
|
||||
m_Name: Feedback
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -2701,54 +2653,6 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1427866734}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1485779444
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1485779446}
|
||||
- component: {fileID: 1485779445}
|
||||
m_Layer: 0
|
||||
m_Name: Webcam-controller
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1485779445
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1485779444}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a85f8bd9399680347b4be72850a56fcf, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
display: {fileID: 378145456}
|
||||
feedback: {fileID: 409590587}
|
||||
popup: {fileID: 1374011069}
|
||||
dynamic: {fileID: 1523390682}
|
||||
--- !u!4 &1485779446
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1485779444}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1493108462
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -2761,7 +2665,7 @@ GameObject:
|
||||
- component: {fileID: 1493108465}
|
||||
- component: {fileID: 1493108464}
|
||||
m_Layer: 5
|
||||
m_Name: video-bg
|
||||
m_Name: Video Background
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -2781,7 +2685,7 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 1159630773}
|
||||
m_Father: {fileID: 301088548}
|
||||
m_RootOrder: 2
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
@@ -3199,141 +3103,6 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1773033262}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1785847567
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1785847568}
|
||||
- component: {fileID: 1785847570}
|
||||
- component: {fileID: 1785847569}
|
||||
m_Layer: 5
|
||||
m_Name: Text (TMP)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1785847568
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1785847567}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 414055543}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0.00024414062}
|
||||
m_SizeDelta: {x: 0, y: 0.00048828}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1785847569
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1785847567}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: < Back to courses
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4281479730
|
||||
m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 48
|
||||
m_fontSizeBase: 48
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 1
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!222 &1785847570
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1785847567}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1813638488
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -3347,7 +3116,7 @@ GameObject:
|
||||
- component: {fileID: 1813638491}
|
||||
- component: {fileID: 1813638490}
|
||||
m_Layer: 5
|
||||
m_Name: Next-sign-button
|
||||
m_Name: Next Sign Button
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -3367,7 +3136,7 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 1427866735}
|
||||
m_Father: {fileID: 301088548}
|
||||
m_RootOrder: 5
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
@@ -3418,8 +3187,8 @@ MonoBehaviour:
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 118887549}
|
||||
m_TargetAssemblyTypeName: StartPause, Assembly-CSharp
|
||||
- m_Target: {fileID: 301088551}
|
||||
m_TargetAssemblyTypeName: TemplateCourse, Assembly-CSharp
|
||||
m_MethodName: NextSign
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
@@ -3617,7 +3386,7 @@ GameObject:
|
||||
- component: {fileID: 2145235738}
|
||||
- component: {fileID: 2145235737}
|
||||
m_Layer: 5
|
||||
m_Name: Tutorial-image-bg
|
||||
m_Name: Learnable Sprite
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
18
Assets/Courses/Scripts/CourseScripts.asmdef
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "CourseScripts",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"Unity.TextMeshPro",
|
||||
"AccountsScripts",
|
||||
"InterfacesScripts"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
7
Assets/Courses/Scripts/CourseScripts.asmdef.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 63c63e721f65ebb7d871cb9ef49f4752
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -5,11 +5,39 @@ using UnityEngine.UI;
|
||||
using UnityEngine.Video;
|
||||
|
||||
/// <summary>
|
||||
/// This class is responsible for loading all data from the Course-scriptableobject.
|
||||
/// Specifically it fetches and displays the correct title, videos and images while also keeping track of the progress.
|
||||
/// TemplateCourse scene manager
|
||||
/// </summary>
|
||||
public class StartPause : MonoBehaviour
|
||||
public class TemplateCourse : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// Index to indicate which camera is being used
|
||||
/// </summary>
|
||||
private int camdex = 0;
|
||||
|
||||
/// <summary>
|
||||
/// This texture is used as an intermidiary between the camera output and the display image
|
||||
/// </summary>
|
||||
private WebCamTexture tex;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the RawImage that will display the video
|
||||
/// </summary>
|
||||
public RawImage webcamDisplay;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the button that is currently used to test the feedback-display
|
||||
/// </summary>
|
||||
public Button feedback;
|
||||
|
||||
/// <summary>
|
||||
/// This is a reference to the PANEL that holds the feedbackwindow
|
||||
/// </summary>
|
||||
public GameObject feedbackPopup;
|
||||
|
||||
/// <summary>
|
||||
/// This is a reference to the textfield that holds the part of the feedback-window that will change: bad/good/excellent
|
||||
/// </summary>
|
||||
public TMP_Text dynamic;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to instructional video player
|
||||
@@ -19,22 +47,21 @@ public class StartPause : MonoBehaviour
|
||||
/// Reference to pause button
|
||||
/// </summary>
|
||||
public Button button;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Reference to sprite for the pause button
|
||||
/// </summary>
|
||||
public Sprite pauseSprite;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the image for displaying the current words sprite
|
||||
/// </summary>
|
||||
public Image wordImage;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the text object for displaying the current word
|
||||
/// </summary>
|
||||
public TextMeshProUGUI title;
|
||||
|
||||
public TMP_Text title;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to user list to get current user
|
||||
@@ -45,29 +72,27 @@ public class StartPause : MonoBehaviour
|
||||
/// The current user
|
||||
/// </summary>
|
||||
private User user;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Current user progress for this course
|
||||
/// </summary>
|
||||
private Progress progress = null;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ScriptableObject with list of all courses
|
||||
/// </summary>
|
||||
public CourseList courselist;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Reference to Course ScriptableObject
|
||||
/// </summary>
|
||||
private Course course;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Index of the current word/letter in the course.learnables list
|
||||
/// </summary>
|
||||
private int currentWordIndex = 0;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// This holds the amount of words in the course
|
||||
/// </summary>
|
||||
@@ -89,11 +114,6 @@ public class StartPause : MonoBehaviour
|
||||
/// </summary>
|
||||
public Button CoursesButton;
|
||||
|
||||
/// <summary>
|
||||
/// Webcam class to close the webcam when the course is finished
|
||||
/// </summary>
|
||||
public Webcam Webcam;
|
||||
|
||||
/// <summary>
|
||||
/// DateTime containint the start moment
|
||||
/// </summary>
|
||||
@@ -102,16 +122,28 @@ public class StartPause : MonoBehaviour
|
||||
/// <summary>
|
||||
/// Reference to the timeSpent UI
|
||||
/// </summary>
|
||||
public TextMeshProUGUI timeSpent;
|
||||
public TMP_Text timeSpent;
|
||||
|
||||
/// <summary>
|
||||
/// This function is called when the script is initialised.
|
||||
/// It inactivatis the popup, finds a webcam to use and links it via the WebcamTexture to the display RawImage.
|
||||
/// It takes the correct course from the courselist, using the courseIndex.
|
||||
/// Then it checks whether or not the User has started the course yet, to possibly create a new progress atribute for the course.
|
||||
/// Then it sets up the course-screen to display relevant information from the course-scriptable.
|
||||
/// </summary>
|
||||
public void Awake()
|
||||
void Awake()
|
||||
{
|
||||
// Setting up Webcam
|
||||
feedbackPopup.SetActive(false);
|
||||
if (WebCamTexture.devices.Length > 0)
|
||||
{
|
||||
WebCamDevice device = WebCamTexture.devices[camdex];
|
||||
tex = new WebCamTexture(device.name);
|
||||
webcamDisplay.texture = tex;
|
||||
|
||||
tex.Play();
|
||||
}
|
||||
|
||||
// Setting up course
|
||||
course = courselist.courses[courselist.currentCourseIndex];
|
||||
maxWords = course.learnables.Count;
|
||||
@@ -140,7 +172,6 @@ public class StartPause : MonoBehaviour
|
||||
startMoment = DateTime.Now;
|
||||
}
|
||||
|
||||
// These two functions generate video and image from files
|
||||
/// <summary>
|
||||
/// This function uses the word_i integer to grab the correct video from the course.learnabels.
|
||||
/// When it has this video, it will load it into the videoplayer and set it to start.
|
||||
@@ -190,7 +221,6 @@ public class StartPause : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Press next-sign button for next word
|
||||
/// <summary>
|
||||
/// This function is called when the next-sign button is pressed.
|
||||
/// It increased the wordindex and fetches new videos/images if index<max, because then the coure is not fincished yet.
|
||||
@@ -222,7 +252,6 @@ public class StartPause : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// finishcourse is called to save the "finished" progress to the user.
|
||||
/// </summary>
|
||||
@@ -236,10 +265,78 @@ public class StartPause : MonoBehaviour
|
||||
timeSpent.text = time.ToString(@"hh\:mm\:ss");
|
||||
|
||||
// Link button
|
||||
//CoursesButton.onClick.AddListener(() => { SceneManager.LoadScene("Assets/Common/Scenes/CoursesScreen.unity"); });
|
||||
CoursesButton.onClick.AddListener(() => { Webcam.LoadScene("Assets/Common/Scenes/CoursesScreen.unity"); });
|
||||
CoursesButton.onClick.AddListener(() => { SystemController.GetInstance().BackToPreviousScene(); });
|
||||
|
||||
progress.AddOrUpdate<float>("courseProgress", 1f);
|
||||
userList.Save();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// So long as there are cameras to use, you swap the camera you are using to another in the list.
|
||||
/// </summary>
|
||||
public void SwapCam()
|
||||
{
|
||||
if (WebCamTexture.devices.Length > 0)
|
||||
{
|
||||
// Stop the old camera
|
||||
// If there was no camera playing before, then you dont have to reset the texture, as it wasn't assigned in the first place.
|
||||
if (tex.isPlaying)
|
||||
{
|
||||
webcamDisplay.texture = null;
|
||||
tex.Stop();
|
||||
tex = null;
|
||||
}
|
||||
// Find the new camera
|
||||
camdex += 1;
|
||||
camdex %= WebCamTexture.devices.Length;
|
||||
// Start the new camera
|
||||
WebCamDevice device = WebCamTexture.devices[camdex];
|
||||
tex = new WebCamTexture(device.name);
|
||||
webcamDisplay.texture = tex;
|
||||
|
||||
tex.Play();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The normal sceneChanger cannot be used here since the camera also needs to be stopped.
|
||||
/// This extra functionality is implemented in this function
|
||||
/// </summary>
|
||||
/// <param name="sceneName"> The path for the scene you want to travel to, assuming root-directory is Assets</param>
|
||||
public void Back()
|
||||
{
|
||||
webcamDisplay.texture = null;
|
||||
tex.Stop();
|
||||
tex = null;
|
||||
|
||||
SystemController.GetInstance().BackToPreviousScene();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This function toggles between inactivity and activity for the popup panel.
|
||||
/// This will be changed later when the model gets integrated, probably being timed to dissapear.
|
||||
/// </summary>
|
||||
public void ShowFeedback()
|
||||
{
|
||||
if (feedbackPopup.activeSelf)
|
||||
{
|
||||
dynamic.text = "";
|
||||
feedbackPopup.SetActive(false);
|
||||
return;
|
||||
}
|
||||
double index = UnityEngine.Random.value;
|
||||
if (index < 0.5)
|
||||
{
|
||||
dynamic.text = "Poor";
|
||||
}
|
||||
else if (index > 0.8)
|
||||
{
|
||||
dynamic.text = "Excellent";
|
||||
}
|
||||
else
|
||||
{
|
||||
dynamic.text = "Good";
|
||||
}
|
||||
feedbackPopup.SetActive(true);
|
||||
}
|
||||
}
|
||||
11
Assets/Courses/Scripts/TemplateCourse.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6b3f784c065813a4a8364b1299284816
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,128 +0,0 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
/// <summary>
|
||||
/// This class is dedicated to the camera and other actions that later could be connected to it, like the feedback.
|
||||
/// It is responsible for finding working cameras, displaying them and being able to toggle between them.
|
||||
/// This class also holds temporary code to display feedback via a button.
|
||||
/// </summary>
|
||||
public class Webcam : MonoBehaviour
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Index to indicate which camera is being used
|
||||
/// </summary>
|
||||
int camdex = 0;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// This texture is used as an intermidiary between the camera output and the display image
|
||||
/// </summary>
|
||||
WebCamTexture tex;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the RawImage that will display the video
|
||||
/// </summary>
|
||||
public RawImage display;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the button that is currently used to test the feedback-display
|
||||
/// </summary>
|
||||
public Button feedback;
|
||||
|
||||
/// <summary>
|
||||
/// This is a reference to the PANEL that holds the feedbackwindow
|
||||
/// </summary>
|
||||
public GameObject popup;
|
||||
|
||||
/// <summary>
|
||||
/// This is a reference to the textfield that holds the part of the feedback-window that will change: bad/good/excellent
|
||||
/// </summary>
|
||||
public TextMeshProUGUI dynamic;
|
||||
|
||||
/// <summary>
|
||||
/// This function is called at the start of the frame.
|
||||
/// It inactivatis the popup, finds a webcam to use and links it via the WebcamTexture to the display RawImage.
|
||||
/// </summary>
|
||||
void Awake()
|
||||
{
|
||||
popup.SetActive(false);
|
||||
if (WebCamTexture.devices.Length > 0) {
|
||||
WebCamDevice device = WebCamTexture.devices[camdex];
|
||||
tex = new WebCamTexture(device.name);
|
||||
display.texture = tex;
|
||||
|
||||
tex.Play();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// So long as there are cameras to use, you swap the camera you are using to another in the list.
|
||||
/// </summary>
|
||||
public void SwapCam()
|
||||
{
|
||||
if (WebCamTexture.devices.Length > 0)
|
||||
{
|
||||
// Stop the old camera
|
||||
// If there was no camera playing before, then you dont have to reset the texture, as it wasn't assigned in the first place.
|
||||
if (tex.isPlaying) {
|
||||
display.texture = null;
|
||||
tex.Stop();
|
||||
tex = null;
|
||||
}
|
||||
// Find the new camera
|
||||
camdex += 1;
|
||||
camdex %= WebCamTexture.devices.Length;
|
||||
// Start the new camera
|
||||
WebCamDevice device = WebCamTexture.devices[camdex];
|
||||
tex = new WebCamTexture(device.name);
|
||||
display.texture = tex;
|
||||
|
||||
tex.Play();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The normal sceneChanger cannot be used here since the camera also needs to be stopped.
|
||||
/// This extra functionality is implemented in this function
|
||||
/// </summary>
|
||||
/// <param name="sceneName"> The path for the scene you want to travel to, assuming root-directory is Assets</param>
|
||||
public void LoadScene(string sceneName)
|
||||
{
|
||||
display.texture = null;
|
||||
tex.Stop();
|
||||
tex = null;
|
||||
|
||||
SceneManager.LoadScene(sceneName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This function toggles between inactivity and activity for the popup panel.
|
||||
/// This will be changed later when the model gets integrated, probably being timed to dissapear.
|
||||
/// </summary>
|
||||
public void Show_feedback()
|
||||
{
|
||||
if (popup.activeSelf)
|
||||
{
|
||||
dynamic.text = "";
|
||||
popup.SetActive(false);
|
||||
return;
|
||||
}
|
||||
double index = UnityEngine.Random.value;
|
||||
if (index < 0.5)
|
||||
{
|
||||
dynamic.text = "Poor";
|
||||
}
|
||||
else if (index > 0.8)
|
||||
{
|
||||
dynamic.text = "Excellent";
|
||||
}
|
||||
else
|
||||
{
|
||||
dynamic.text = "Good";
|
||||
}
|
||||
popup.SetActive(true);
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
using NUnit.Framework;
|
||||
|
||||
public class BasicTest
|
||||
{
|
||||
// check if edit mode tests works
|
||||
[Test]
|
||||
public void AlwaysTrueTest()
|
||||
{
|
||||
Assert.True(true);
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"name": "EditModeTests",
|
||||
"optionalUnityReferences": [
|
||||
"TestAssemblies"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
]
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4a55a1703b7efe449be66773a42e7ff0
|
||||
guid: 1dd701eefa37cbe4e9ed52960fa7a7cf
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
214
Assets/JustSign/Prefabs/Symbol.prefab
Normal file
@@ -0,0 +1,214 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &4639383499500021565
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7664190503744730416}
|
||||
- component: {fileID: 4730176006060198146}
|
||||
- component: {fileID: 1836798560195404133}
|
||||
m_Layer: 5
|
||||
m_Name: Symbol
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &7664190503744730416
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4639383499500021565}
|
||||
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: 6279317507399066568}
|
||||
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: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4730176006060198146
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4639383499500021565}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1836798560195404133
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4639383499500021565}
|
||||
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 &7932988193255257378
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6279317507399066568}
|
||||
- component: {fileID: 2862254737186411956}
|
||||
- component: {fileID: 3570096111438075237}
|
||||
m_Layer: 5
|
||||
m_Name: Text (TMP)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6279317507399066568
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7932988193255257378}
|
||||
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: 7664190503744730416}
|
||||
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 &2862254737186411956
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7932988193255257378}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &3570096111438075237
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7932988193255257378}
|
||||
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: A
|
||||
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: 4282795590
|
||||
m_fontColor: {r: 0.27450982, g: 0.27450982, b: 0.27450982, 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: 32
|
||||
m_fontSizeBase: 32
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 1
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
7
Assets/JustSign/Prefabs/Symbol.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f3117b0203a1342a48a95904347b03c8
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
5604
Assets/JustSign/Scenes/Game.unity
Normal file
7
Assets/JustSign/Scenes/Game.unity.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1283017ac1c1f6226854442564bd7e3d
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
21
Assets/JustSign/ScriptableObjects/JustSign.asset
Normal file
@@ -0,0 +1,21 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d7809d135a59849458ccb29ffad535c5, type: 3}
|
||||
m_Name: JustSign
|
||||
m_EditorClassIdentifier:
|
||||
index: 2
|
||||
title: Just Sign
|
||||
description: A rhythm game
|
||||
needsTheme: 1
|
||||
thumbnail: {fileID: 0}
|
||||
minigameEntryPoint: JustSign/Scenes/Game
|
||||
controls: test
|
||||
8
Assets/JustSign/ScriptableObjects/JustSign.asset.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e726e0b93ea88465db7ee27605deb83f
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
284
Assets/JustSign/Scripts/JustSignController.cs
Normal file
@@ -0,0 +1,284 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
/// <summary>
|
||||
/// Contains all game logic for the JustSign game
|
||||
/// </summary>
|
||||
public class JustSignController : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// The canvas containing all components
|
||||
/// </summary>
|
||||
public Canvas canvas;
|
||||
|
||||
/// <summary>
|
||||
/// The input field where the user can type his or her answer
|
||||
/// </summary>
|
||||
public TMP_InputField answerField;
|
||||
|
||||
/// <summary>
|
||||
/// The feedback on the timing
|
||||
/// </summary>
|
||||
public TMP_Text feedBack;
|
||||
|
||||
/// <summary>
|
||||
/// The current score
|
||||
/// </summary>
|
||||
public TMP_Text scoreDisplay;
|
||||
|
||||
/// <summary>
|
||||
/// The zone that the player should be hitting with his or her inputs
|
||||
/// </summary>
|
||||
public GameObject hitZone;
|
||||
|
||||
/// <summary>
|
||||
/// Symbol prefab
|
||||
/// </summary>
|
||||
public GameObject symbolPrefab;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to symbol prefab
|
||||
/// </summary>
|
||||
public Transform symbolContainer;
|
||||
|
||||
/// <summary>
|
||||
/// All of the words that can be used in this session
|
||||
/// </summary>
|
||||
private string[] words;
|
||||
|
||||
/// <summary>
|
||||
/// All of the available themes
|
||||
/// </summary>
|
||||
private ThemeList themeList;
|
||||
|
||||
/// <summary>
|
||||
/// The theme we are currently using
|
||||
/// </summary>
|
||||
private Theme currentTheme;
|
||||
|
||||
/// <summary>
|
||||
/// List of strings representing all words on the track
|
||||
/// </summary>
|
||||
private List<string> activeWords = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// List of objects representing all symbols on the track
|
||||
/// </summary>
|
||||
private List<GameObject> activeSymbols = new List<GameObject>();
|
||||
|
||||
/// <summary>
|
||||
/// The current score
|
||||
/// </summary>
|
||||
private int score;
|
||||
|
||||
/// <summary>
|
||||
/// Width and height of the symbols
|
||||
/// </summary>
|
||||
private int symbolSize = 280;
|
||||
|
||||
/// <summary>
|
||||
/// Controls movement speed of symbols (higher -> faster)
|
||||
/// </summary>
|
||||
private int moveSpeed = 200;
|
||||
|
||||
/// <summary>
|
||||
/// Starting X-coordinate of a symbol = (-1920 - symbolsize) / 2
|
||||
/// </summary>
|
||||
private int trackX = -1100;
|
||||
|
||||
/// <summary>
|
||||
/// Starting Y-coordinate of a symbol
|
||||
/// </summary>
|
||||
private int trackY = -200;
|
||||
|
||||
/// <summary>
|
||||
/// Max distance from hit zone to get perfect score
|
||||
/// </summary>
|
||||
private int perfectBoundary = 10;
|
||||
|
||||
/// <summary>
|
||||
/// Score obtained when getting a perfect hit
|
||||
/// </summary>
|
||||
private int perfectScore = 5;
|
||||
|
||||
/// <summary>
|
||||
/// Max distance from hit zone to get good score
|
||||
/// </summary>
|
||||
private int goodBoundary = 120;
|
||||
|
||||
/// <summary>
|
||||
/// Score obtained when getting a good hit
|
||||
/// </summary>
|
||||
private int goodScore = 3;
|
||||
|
||||
/// <summary>
|
||||
/// Max distance from hit zone to get meh score
|
||||
/// </summary>
|
||||
private int mehBoundary = 200;
|
||||
|
||||
/// <summary>
|
||||
/// Score obtained when getting a meh hit
|
||||
/// </summary>
|
||||
private int mehScore = 1;
|
||||
|
||||
/// <summary>
|
||||
/// Score obtained when getting a terrible hit
|
||||
/// </summary>
|
||||
private int terribleScore = -3;
|
||||
|
||||
/// <summary>
|
||||
/// Score obtained when symbol goes offscreen
|
||||
/// </summary>
|
||||
private int offscreenScore = -5;
|
||||
|
||||
/// <summary>
|
||||
/// Time at which the last symbol was spawned
|
||||
/// </summary>
|
||||
private float lastSpawn;
|
||||
|
||||
/// <summary>
|
||||
/// Determines every how many seconds a symbol should spawn (will become music-dependent later on)
|
||||
/// </summary>
|
||||
private float spawnPeriod = 3.0f;
|
||||
|
||||
/// <summary>
|
||||
/// Start is called before the first frame update
|
||||
/// </summary>
|
||||
void Start()
|
||||
{
|
||||
scoreDisplay.text = "Score: " + score.ToString();
|
||||
themeList = ThemeLoader.LoadJson();
|
||||
currentTheme = FindThemeByName(PlayerPrefs.GetString("themeName"));
|
||||
words = currentTheme.words;
|
||||
lastSpawn = Time.time;
|
||||
SpawnNewSymbol();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update is called once per frame
|
||||
/// </summary>
|
||||
void Update()
|
||||
{
|
||||
int matchedSymbolIndex = -1;
|
||||
for (int i = 0; i < activeWords.Count; i++) {
|
||||
if (activeWords[i] == answerField.text.ToLower()) {
|
||||
matchedSymbolIndex = i;
|
||||
}
|
||||
}
|
||||
|
||||
// Destroy the oldest symbol if the current input matches it
|
||||
if (matchedSymbolIndex >= 0) {
|
||||
int difference = Math.Abs((int) (activeSymbols[matchedSymbolIndex].transform.position.x - hitZone.transform.position.x));
|
||||
if (difference < perfectBoundary) {
|
||||
feedBack.text = "Perfect!";
|
||||
score += perfectScore;
|
||||
} else if (difference < goodBoundary) {
|
||||
feedBack.text = "Good!";
|
||||
score += goodScore;
|
||||
} else if (difference < mehBoundary) {
|
||||
feedBack.text = "Meh...";
|
||||
score += mehScore;
|
||||
} else {
|
||||
feedBack.text = "Terrible!";
|
||||
score += terribleScore;
|
||||
}
|
||||
|
||||
DestroySymbolAt(matchedSymbolIndex);
|
||||
answerField.text = "";
|
||||
}
|
||||
|
||||
// Destroy the oldest symbol if it leaves the screen
|
||||
if (activeSymbols.Count > 0) {
|
||||
if (activeSymbols[0].GetComponent<RectTransform>().localPosition.x > -trackX) {
|
||||
DestroySymbolAt(0);
|
||||
score += offscreenScore;
|
||||
}
|
||||
}
|
||||
|
||||
// Spawn new symbol every spawn period
|
||||
float currentTime = Time.time;
|
||||
if (currentTime - lastSpawn > spawnPeriod) {
|
||||
lastSpawn = currentTime;
|
||||
SpawnNewSymbol();
|
||||
}
|
||||
|
||||
// Move all active symbols to the right
|
||||
foreach (GameObject symbol in activeSymbols) {
|
||||
RectTransform rectTransform = symbol.GetComponent<RectTransform>();
|
||||
rectTransform.localPosition = new Vector3(rectTransform.localPosition.x + Time.deltaTime * moveSpeed, trackY, 0);
|
||||
}
|
||||
|
||||
scoreDisplay.text = "Score: " + score.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Destroy the symbol at the given index
|
||||
/// </summary>
|
||||
/// <param name="index">The index of the symbol to destroy</param>
|
||||
void DestroySymbolAt(int index) {
|
||||
activeWords.RemoveAt(index);
|
||||
GameObject symbol = activeSymbols[index];
|
||||
activeSymbols.RemoveAt(index);
|
||||
Destroy(symbol);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Find the chosen theme by its name
|
||||
/// </summary>
|
||||
/// <param name="themeName">The name of the theme to find</param>
|
||||
/// <returns>The requested theme</returns>
|
||||
private Theme FindThemeByName(string themeName)
|
||||
{
|
||||
int themeIndex = 0;
|
||||
|
||||
while (themeIndex < themeList.themes.Length)
|
||||
{
|
||||
Theme theme = themeList.themes[themeIndex];
|
||||
if (theme.name == themeName)
|
||||
{
|
||||
return theme;
|
||||
}
|
||||
themeIndex++;
|
||||
}
|
||||
|
||||
Debug.Log("Requested theme not found");
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a new symbol at the start of the track
|
||||
/// </summary>
|
||||
void SpawnNewSymbol() {
|
||||
// Pick a word that isn't in use yet
|
||||
List<int> unusedWordIndices = new List<int>();
|
||||
|
||||
for (int i = 0; i < words.Length; i++) {
|
||||
if (!activeWords.Contains(words[i])) {
|
||||
unusedWordIndices.Add(i);
|
||||
}
|
||||
}
|
||||
|
||||
string nextSymbol = words[unusedWordIndices[UnityEngine.Random.Range(0, unusedWordIndices.Count)]];
|
||||
|
||||
GameObject newSymbolObject = GameObject.Instantiate(symbolPrefab, symbolContainer);
|
||||
|
||||
// Dynamically load appearance
|
||||
Image image = newSymbolObject.GetComponent<Image>();
|
||||
Sprite sprite = Resources.Load<Sprite>("Common/Images/" + nextSymbol);
|
||||
image.sprite = sprite;
|
||||
image.rectTransform.sizeDelta = new Vector2(symbolSize, symbolSize);
|
||||
|
||||
// Place the word that the symbol represents under the image
|
||||
TMP_Text text = newSymbolObject.GetComponentInChildren<TMP_Text>();
|
||||
text.text = nextSymbol;
|
||||
text.color = Color.black;
|
||||
text.rectTransform.localPosition = new Vector3(0, -160, 0);
|
||||
|
||||
activeWords.Add(nextSymbol);
|
||||
activeSymbols.Add(newSymbolObject);
|
||||
}
|
||||
}
|
||||
11
Assets/JustSign/Scripts/JustSignController.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9ede962218eda88668cd8032b921aada
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
72
Assets/JustSign/Scripts/JustSignWebcam.cs
Normal file
@@ -0,0 +1,72 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
/// <summary>
|
||||
/// Class to manage all webcam stuff inside the SpellingBee minigame
|
||||
/// </summary>
|
||||
public class JustSignWebcam : 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();
|
||||
}
|
||||
}
|
||||
11
Assets/JustSign/Scripts/JustSignWebcam.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d9291edb7593521fbb7e0a486724fd3c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 55cd80546e3f9d043b59677c12f0e891
|
||||
guid: 1ee41ca2081752982b238b492bd8c4ff
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |