29 lines
772 B
C#
29 lines
772 B
C#
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
/// <summary>
|
|
/// Keep track off defined themes
|
|
/// </summary>
|
|
[CreateAssetMenu(menuName = "Create new Scriptable/Theme List")]
|
|
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 index
|
|
/// </summary>
|
|
/// <param name="title"></param>
|
|
public void SetCurrentTheme(ThemeIndex index)
|
|
{
|
|
this.currentThemeIndex = themes.FindIndex((mi) => mi.themeIndex == index);
|
|
}
|
|
}
|