|
|
@ -3,6 +3,7 @@ using UnityEngine.UI; |
|
|
|
using System.IO; |
|
|
|
using YamlDotNet.Serialization; |
|
|
|
using YamlDotNet.Serialization.NamingConventions; |
|
|
|
using UnityEngine.SceneManagement; |
|
|
|
|
|
|
|
public class Game : MonoBehaviour |
|
|
|
{ |
|
|
@ -26,7 +27,6 @@ public class Game : MonoBehaviour |
|
|
|
_categories = FindObjectsOfType<Category>(); |
|
|
|
|
|
|
|
int topicIndex = Random.Range(0, _gameData.Topics.Count); |
|
|
|
topicIndex = 0; |
|
|
|
TopicData topicData = _gameData.Topics[topicIndex]; |
|
|
|
_gameData.Topics.RemoveAt(topicIndex); |
|
|
|
|
|
|
@ -38,6 +38,7 @@ public class Game : MonoBehaviour |
|
|
|
|
|
|
|
category.Name = categoryData.Category; |
|
|
|
category.Elements = categoryData.Elements; |
|
|
|
category.ResetElements(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
@ -130,6 +131,9 @@ public class Game : MonoBehaviour |
|
|
|
// Update is called once per frame
|
|
|
|
void Update() |
|
|
|
{ |
|
|
|
|
|
|
|
if (Input.GetKeyDown(KeyCode.R)) |
|
|
|
{ |
|
|
|
SceneManager.LoadScene(SceneManager.GetActiveScene().name); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|