2025-09-08 14:51:28 +08:00
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
using ZXKFramework;
|
2025-09-08 17:37:12 +08:00
|
|
|
namespace DongWuYiXue.DaoNiaoShu
|
2025-09-08 14:51:28 +08:00
|
|
|
{
|
|
|
|
|
public class GuidePanel : UIBase
|
|
|
|
|
{
|
|
|
|
|
public override string GroupName => "GuidePanel";
|
|
|
|
|
public override string Name => "GuidePanel";
|
|
|
|
|
|
|
|
|
|
Text guide;
|
|
|
|
|
List<string> str = new();
|
|
|
|
|
Coroutine coroutine;
|
|
|
|
|
public override void Init(IUIManager uictrl)
|
|
|
|
|
{
|
|
|
|
|
base.Init(uictrl);
|
|
|
|
|
guide = transform.FindFirst<Text>("guideText");
|
|
|
|
|
}
|
|
|
|
|
public void ShowGuide(string txt)
|
|
|
|
|
{
|
|
|
|
|
if (string.IsNullOrEmpty(txt)) return;
|
|
|
|
|
guide.text = txt;
|
|
|
|
|
SetActive(true);
|
|
|
|
|
}
|
|
|
|
|
public override void Show()
|
|
|
|
|
{
|
|
|
|
|
base.Show();
|
|
|
|
|
if (coroutine != null)
|
|
|
|
|
{
|
|
|
|
|
StopCoroutine(coroutine);
|
|
|
|
|
coroutine = null;
|
|
|
|
|
}
|
|
|
|
|
coroutine = StartCoroutine(Close());
|
|
|
|
|
}
|
|
|
|
|
public override void Hide()
|
|
|
|
|
{
|
|
|
|
|
base.Hide();
|
|
|
|
|
if(coroutine != null)
|
|
|
|
|
StopCoroutine(coroutine);
|
|
|
|
|
}
|
|
|
|
|
IEnumerator Close()
|
|
|
|
|
{
|
|
|
|
|
yield return new WaitForSeconds(8f);
|
|
|
|
|
SetActive(false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|