using System.Collections; using System.Collections.Generic; using UnityEngine; public class GameNotice { static bool noticeShowed = false; public static void OpenGameNotice() { try { if (VersionUtility.Instance.versionInfo == null || noticeShowed) return; var url = VersionUtility.Instance.versionInfo.GetNoticeURL(VersionConfig.Get().branch); if (!string.IsNullOrEmpty(url)) { ynmbxxjUtil.Instance.OpenUrl(url); noticeShowed = true; } } catch (System.Exception ex) { noticeShowed = true; } } public static bool HasNotice() { try { if (VersionUtility.Instance.versionInfo == null) return false; var url = VersionUtility.Instance.versionInfo.GetNoticeURL(VersionConfig.Get().branch); DebugEx.LogFormat("公告地址:{0}", url); return !string.IsNullOrEmpty(url); } catch (System.Exception ex) { return false; } } public static void OpenGameNoticeForce() { try { if (VersionUtility.Instance.versionInfo == null) return; var url = VersionUtility.Instance.versionInfo.GetNoticeURL(VersionConfig.Get().branch); if (!string.IsNullOrEmpty(url)) { ynmbxxjUtil.Instance.OpenUrl(url); } } catch (System.Exception ex) { Debug.Log(ex); } } }