Resolve WES-80 "Data"

This commit is contained in:
Helena Van Breugel
2023-03-18 22:32:36 +00:00
parent 8ff5c6c4c8
commit a19d89db03
1092 changed files with 18349 additions and 30118 deletions

View File

@@ -0,0 +1,39 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// Keep track off defined themes
/// </summary>
[CreateAssetMenu(menuName = "Create new Scriptable/ThemeList")]
public class ThemeList : ScriptableObject
{
/// <summary>
/// Index of the active/to be loaded/current theme
/// </summary>
public int currentThemeIndex = 0;
/// <summary>
/// List of all defined themes
/// </summary>
public List<Theme> themes = new List<Theme>();
/// <summary>
/// Function to find a theme-index in the list based on its title
/// </summary>
/// <param name="title"></param>
public void SetCurrentTheme(string title)
{
this.currentThemeIndex = themes.FindIndex((mi) => mi.title == title);
}
/// <summary>
/// Function to find a theme-index in the list based on its index
/// </summary>
/// <param name="title"></param>
public void SetCurrentTheme(ThemeIndex index)
{
this.currentThemeIndex = themes.FindIndex((mi) => mi.index == index);
}
}