47 lines
961 B
C#
47 lines
961 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Sirenix.OdinInspector;
|
|
using UnityEngine;
|
|
|
|
namespace UnityTest.ZXL
|
|
{
|
|
public class UIManager : BaseAutoMono<UIManager>
|
|
{
|
|
public List<UIObjectData> uiObjectData = new List<UIObjectData>();
|
|
|
|
public void ShowUI(UIType uiType)
|
|
{
|
|
}
|
|
|
|
public void HideUI(UIType uiType)
|
|
{
|
|
}
|
|
|
|
#if UNITY_EDITOR
|
|
[Button]
|
|
void Add()
|
|
{
|
|
var uis = this.gameObject.GetComponentAllChild<UI>();
|
|
foreach (var ui in uis)
|
|
{
|
|
uiObjectData.Add(new UIObjectData() {uiType = ui.uiType, ui = ui});
|
|
}
|
|
}
|
|
#endif
|
|
}
|
|
|
|
public enum UIType
|
|
{
|
|
Chapter, //章节
|
|
StrongTips, //强提示
|
|
WeakTips, //弱提示
|
|
Dialogue, //对话
|
|
}
|
|
|
|
[System.Serializable]
|
|
public struct UIObjectData
|
|
{
|
|
public UIType uiType;
|
|
public UI ui;
|
|
}
|
|
} |