1
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
@@ -208,12 +208,40 @@ public class UIManager : MonoSingleton<UIManager>
|
||||
}
|
||||
public GameObject BoardPanelParefab;
|
||||
public GameObject BoardPanelParefabGongGao;
|
||||
public GameObject HuoDeParefab;
|
||||
public void ShowBoardError(string str)
|
||||
{
|
||||
|
||||
StartCoroutine(IEShowBoard(str));
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 显示"恭喜获得"奖励面板(随时访问,类似公告)。10秒未关闭则自动关闭。
|
||||
/// </summary>
|
||||
/// <param name="backPackPropItemDatas">奖励道具数据列表</param>
|
||||
/// <param name="onCloseAction">关闭面板时回调(处理特殊情况)</param>
|
||||
public void ShowHuoDe(List<BackPackPropItemData> backPackPropItemDatas, Action onCloseAction = null)
|
||||
{
|
||||
StartCoroutine(IEShowHuoDe(backPackPropItemDatas, onCloseAction));
|
||||
}
|
||||
IEnumerator IEShowHuoDe(List<BackPackPropItemData> backPackPropItemDatas, Action onCloseAction)
|
||||
{
|
||||
if (HuoDeParefab == null)
|
||||
{
|
||||
Debug.LogWarning("HuoDeParefab 未赋值");
|
||||
yield break;
|
||||
}
|
||||
var obj = Instantiate(HuoDeParefab, uiRoot);
|
||||
obj.transform.SetAsLastSibling();
|
||||
var huode = obj.GetComponent<HuoDe>();
|
||||
if (huode != null)
|
||||
huode.Init(backPackPropItemDatas, onCloseAction);
|
||||
|
||||
// 10秒后未手动关闭则自动关闭
|
||||
yield return new WaitForSeconds(10f);
|
||||
if (obj != null)
|
||||
huode?.Close();
|
||||
}
|
||||
public void ShowBoardGongGao(string str)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user