Merge branch 'development' into 'WES-81-justsign'
# Conflicts: # Assets/SpellingBee/Scripts/GameController.cs
This commit is contained in:
17
Assets/Accounts/Scripts/AccountsScripts.asmdef
Normal file
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,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e901944427bb1104a881881efebd3737
|
||||
guid: bf5ea73aa43049e45a0ad926db15f315
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
27
Assets/Accounts/Tests/AccountsTests.asmdef
Normal file
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
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();
|
||||
|
||||
8
Assets/Common/Interfaces.meta
Normal file
8
Assets/Common/Interfaces.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e88996685ebf2274ea70a64e08b7ddd7
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3ac4eb825ce7bf5499f083eaf34d5d4d
|
||||
guid: a5bf21dee022ed0489face1c734359de
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
3
Assets/Common/Interfaces/InterfacesScripts.asmdef
Normal file
3
Assets/Common/Interfaces/InterfacesScripts.asmdef
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"name": "InterfacesScripts"
|
||||
}
|
||||
7
Assets/Common/Interfaces/InterfacesScripts.asmdef.meta
Normal file
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
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: 74f8b297e568e071198f12d32c3f32c0
|
||||
guid: 295706da5995d69468daf35ad5527089
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
19
Assets/Common/Scripts/CommonScripts.asmdef
Normal file
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
7
Assets/Common/Scripts/CommonScripts.asmdef.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3444c67d5a3a93e5a95a48906078c372
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -107,7 +107,7 @@ public class MinigameActivityScreen : MonoBehaviour
|
||||
int index = minigameList.currentMinigameIndex;
|
||||
Minigame minigame = minigameList.minigames[index];
|
||||
|
||||
List<Tuple<string, Sprite, GameController.Score>> allScores = new List<Tuple<string, Sprite, GameController.Score>>();
|
||||
List<Tuple<string, Sprite, Score>> allScores = new List<Tuple<string, Sprite, Score>>();
|
||||
foreach (User user in userList.GetUsers())
|
||||
{
|
||||
// Get user's progress for this minigame
|
||||
@@ -115,10 +115,10 @@ public class MinigameActivityScreen : MonoBehaviour
|
||||
if (progress != null)
|
||||
{
|
||||
// Add scores to dictionary
|
||||
List<GameController.Score> scores = progress.Get<List<GameController.Score>>("scores");
|
||||
foreach (GameController.Score score in scores)
|
||||
List<Score> scores = progress.Get<List<Score>>("scores");
|
||||
foreach (Score score in scores)
|
||||
{
|
||||
allScores.Add(new Tuple<string, Sprite, GameController.Score>(user.username, user.avatar, score));
|
||||
allScores.Add(new Tuple<string, Sprite, Score>(user.username, user.avatar, score));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -127,11 +127,11 @@ public class MinigameActivityScreen : MonoBehaviour
|
||||
allScores.Sort((a, b) => b.Item3.scoreValue.CompareTo(a.Item3.scoreValue));
|
||||
|
||||
// Instantiate scoreboard entries
|
||||
foreach (Tuple<string, Sprite, GameController.Score> tup in allScores.Take(3))
|
||||
foreach (Tuple<string, Sprite, Score> tup in allScores.Take(3))
|
||||
{
|
||||
string username = tup.Item1;
|
||||
Sprite sprite = tup.Item2;
|
||||
GameController.Score score = tup.Item3;
|
||||
Score score = tup.Item3;
|
||||
|
||||
GameObject instance = GameObject.Instantiate(prefab, userContainer);
|
||||
instance.transform.Find("Title").GetComponent<TMP_Text>().text = username;
|
||||
|
||||
18
Assets/Courses/Scripts/CourseScripts.asmdef
Normal file
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
7
Assets/Courses/Scripts/CourseScripts.asmdef.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 63c63e721f65ebb7d871cb9ef49f4752
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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"
|
||||
]
|
||||
}
|
||||
@@ -193,16 +193,6 @@ public class GameController : MonoBehaviour
|
||||
/// </summary>
|
||||
public GameObject scoreboardEntry;
|
||||
|
||||
/// <summary>
|
||||
/// Score class TODO: Move to separate file
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class Score
|
||||
{
|
||||
public int scoreValue;
|
||||
public string time;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Start is called before the first frame update
|
||||
|
||||
14
Assets/SpellingBee/Scripts/Score.cs
Normal file
14
Assets/SpellingBee/Scripts/Score.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
|
||||
public partial class GameController
|
||||
{
|
||||
/// <summary>
|
||||
/// Score class TODO: Move to separate file
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class Score
|
||||
{
|
||||
public int scoreValue;
|
||||
public string time;
|
||||
}
|
||||
}
|
||||
11
Assets/SpellingBee/Scripts/Score.cs.meta
Normal file
11
Assets/SpellingBee/Scripts/Score.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 44c1f8e0fa862b44485ebaa3c81698fc
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
19
Assets/SpellingBee/Scripts/SpellingBeeScripts.asmdef
Normal file
19
Assets/SpellingBee/Scripts/SpellingBeeScripts.asmdef
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "SpellingBeeScripts",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:6055be8ebefd69e48b49212b09b47b2f",
|
||||
"GUID:1631ed2680c61245b8211d943c1639a8",
|
||||
"GUID:3444c67d5a3a93e5a95a48906078c372",
|
||||
"GUID:df9d7b70293a2e14d9d3a018c3956f7a"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 49d8025a5c8c313cea12c9a1de36c09b
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user