1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- using LitJson;
- using SUIFW;
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.SceneManagement;
- namespace XRTool.Util
- {
- /// <summary>
- /// 通用方法
- /// </summary>
- public static class CommonMethod
- {
- public static GameObject TusiObj;
- public static string tempToken;
- public static GameObject Loading;
- public static GameObject ScanEffect;
- public static List<int> scenes = new List<int>();
- public static int currentScene;
- public static string selfHomepeerId;
- public static string roomPassWord;
- public static bool IsReceive;
- /// <summary>
- /// 获取当前本地时间戳
- /// </summary>
- /// <returns></returns>
- public static long GetCurrentTimeUnix()
- {
- TimeSpan cha = (DateTime.Now - TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1)));
- long t = (long)cha.TotalSeconds;
- return t;
- }
- public static void HideLoading()
- {
- UIMaskMgr.GetInstance().HideMask();
- }
- public static Queue<string> queueList =new Queue<string>();
- public static void ShowNetLoading(string str,string message)
- {
- if (queueList.Count <= 0)
- {
- UIMaskMgr.GetInstance().ShowMask();
- }
- queueList.Enqueue(str);
- }
- public static void HideNetLoading(string str)
- {
- if (queueList.Count > 0)
- {
- queueList.Dequeue();
- if (queueList.Count <= 0)
- {
- UIMaskMgr.GetInstance().HideMask();
- }
- }
- }
- }
- }
|