Files
UltimateFishing/Assets/Scripts/Assembly-CSharp/GUIManager.cs
2026-02-21 16:45:37 +08:00

86 lines
1.1 KiB
C#

using BitStrap;
using UnityEngine;
public class GUIManager : MonoBehaviour
{
public enum FontType
{
MAIN = 0,
HEADER = 1,
BUTTON = 2,
MENU_BUTTON = 3
}
public Font[] fonts = new Font[4];
public bool[] fontsToUpper = new bool[4];
public Color[] colors = new Color[10];
[Header("Test Colors")]
public int testColorId = 5;
public Color[] testColors = new Color[5];
private int currentTestColor;
[Space(10f)]
public int testColorId2 = 5;
public Color[] testColors2 = new Color[5];
private int currentTestColor2;
private static GUIManager instance;
public Font commonFont;
public static GUIManager Instance
{
get
{
return instance;
}
}
private GUIManager()
{
}
[Button]
public void UpdateAllFonts()
{
for (int i = 0; i < fonts.Length; i++)
{
fonts[i] = commonFont;
}
}
private void Awake()
{
if (instance == null)
{
instance = this;
}
}
private void Update()
{
}
public Font GetFont(FontType type)
{
return fonts[(int)type];
}
public bool GetFontToUpper(FontType type)
{
return fontsToUpper[(int)type];
}
public Color GetColor(int id)
{
return colors[id];
}
}