This commit is contained in:
2026-07-10 00:35:59 +08:00
parent b4275fdcf4
commit 2d550bd2a0
14 changed files with 1047 additions and 27 deletions
+19
View File
@@ -209,6 +209,7 @@ public class UIManager : MonoSingleton<UIManager>
public GameObject BoardPanelParefab;
public GameObject BoardPanelParefabGongGao;
public GameObject HuoDeParefab;
public GameObject TiShiParefab;
public void ShowBoardError(string str)
{
@@ -224,6 +225,24 @@ public class UIManager : MonoSingleton<UIManager>
{
StartCoroutine(IEShowHuoDe(backPackPropItemDatas, onCloseAction));
}
/// <summary>
/// 显示提示窗口(随时访问)。不自动关闭,需手动点确认/关闭按钮。
/// </summary>
/// <param name="text">提示内容</param>
/// <param name="onConfirmAction">点击确认按钮时的回调(可选),关闭按钮不触发</param>
public void ShowTiShi(string text, Action onConfirmAction = null)
{
if (TiShiParefab == null)
{
Debug.LogWarning("TiShiParefab 未赋值");
return;
}
var obj = Instantiate(TiShiParefab, uiRoot);
obj.transform.SetAsLastSibling();
var tishi = obj.GetComponent<TiShi>();
if (tishi != null)
tishi.Init(text, onConfirmAction);
}
IEnumerator IEShowHuoDe(List<BackPackPropItemData> backPackPropItemDatas, Action onCloseAction)
{
if (HuoDeParefab == null)