using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class JustSignController : MonoBehaviour
{
///
/// All of the words that can be used in this session
///
private string[] words;
///
/// All of the available themes
///
private ThemeList themeList;
///
/// The theme we are currently using
///
private Theme currentTheme;
// Start is called before the first frame update
void Start()
{
themeList = ThemeLoader.LoadJson();
currentTheme = FindThemeByName(PlayerPrefs.GetString("themeName"));
words = currentTheme.words;
}
// Update is called once per frame
void Update()
{
}
///
/// Find the chosen theme by its name
///
/// The name of the theme to find
/// The requested theme
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;
}
}