123456789101112131415161718192021222324252627282930313233343536 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- namespace Rokid.MRC
- {
- public class UITipsPanel : UIPanelBase
- {
- private Text txtDesc;
- public float time = 1;
- public override void OnInit()
- {
- base.OnInit();
- txtDesc = transform.Find("TxtLoading").GetComponent<Text>();
- }
- public void SetDesc(string desc)
- {
- gameObject.SetActive(true);
- txtDesc.text = desc;
- UIManager.Instance.StartCoroutine(WaitAndClose());
- }
- IEnumerator WaitAndClose()
- {
- yield return new WaitForSeconds(time);
- gameObject.SetActive(false);
- }
- }
- }
|