123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- using System;
- using UnityEngine.UI;
- internal class InfoShow
- {
- private static InfoShow _instance;
- public static InfoShow Instance
- {
- get
- {
- if (_instance == null)
- {
- _instance = new InfoShow();
- }
- return _instance;
- }
- }
- public Text titleText;
- public Text infoText;
- public Action action;
- public bool isAction = false;
- public void LogNetError(string errorMsg)
- {
- action = new Action(() =>
- {
- titleText.text = "网络错误";
- infoText.text = errorMsg;
- });
- isAction = true;
- }
- public void LogAuthorError(string errorMsg)
- {
- action = new Action(() =>
- {
- titleText.text = "授权错误";
- infoText.text = errorMsg;
- });
- isAction = true;
- }
- public void LogError(string errorMsg)
- {
- action = new Action(() =>
- {
- titleText.text = "错误";
- infoText.text = errorMsg;
- });
- isAction = true;
- }
- }
|