using LitJson; using SUIFW; using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; namespace XRTool.Util { /// /// 通用方法 /// public static class CommonMethod { public static GameObject TusiObj; public static string tempToken; public static GameObject Loading; public static GameObject ScanEffect; public static List scenes = new List(); public static int currentScene; public static string selfHomepeerId; public static string roomPassWord; public static bool IsReceive; /// /// 获取当前本地时间戳 /// /// 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 queueList =new Queue(); 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(); } } } } }