123456789101112131415161718192021222324252627282930313233343536373839 |
- using System.Collections;
- using System.Collections.Generic;
- using TMPro;
- using UnityEngine;
- using UnityEngine.UI;
- using XRTool.Util;
- public class ErrorManager : WindowSingleton<ErrorManager>
- {
- public RawImage iconBg;
- public RawImage icon;
- public TextMeshProUGUI TitleText;
- public TextMeshProUGUI MessageText;
- public TextMeshProUGUI actionText;
- public GameObject actionTextGO;
- public GameObject actionButtonGO;
- int timeDjs = 0;
- public void show(string title,string Msg,Texture iconBg,Texture icon,bool isText=true,string djsMsg="",int time=5)
- {
- this.gameObject.SetActive(true);
- if(isText)
- {
- actionTextGO.gameObject.SetActive(true);
- actionButtonGO.gameObject.SetActive(false);
- timeDjs = time;
- TimerMgr.Instance.CreateTimer(()=> {
- timeDjs--;
- // actionText = "";
- },1, time);
- }
- }
- public void hide()
- {
- this.gameObject.SetActive(false);
- }
- }
|