using UnityEngine; using System.Collections; using System; using Games.GlobeDefine; public class NoticeLogic : UIControllerBase{ // private static NoticeLogic m_Instance = null; // public static NoticeLogic Instance() // { // return m_Instance; // } public static int ReceiveData = 0; void Awake() { UIControllerBase.SetInstance(this); // m_Instance = this; } // void OnDestroy() // { // // m_Instance = null; // } // Use this for initialization void Start () { // gameObject.SetActive(false); } public static void TryOpen() { if (null != Singleton.GetInstance().MainPlayer) { int nTiem = Singleton.GetInstance().MainPlayer.AutoNotice; int nmonth = nTiem / 100; int nday = nTiem % 100; if (nmonth == DateTime.Now.Month && DateTime.Now.Day == nday) { Singleton.GetInstance().MainPlayer.AutoNotice = DateTime.Now.Month * 100 + DateTime.Now.Day; Singleton.GetInstance().MainPlayer.ServerAutoInfo(); return; } Singleton.GetInstance().MainPlayer.AutoNotice = DateTime.Now.Month * 100 + DateTime.Now.Day; Singleton.GetInstance().MainPlayer.ServerAutoInfo(); OpenUI(); } } public static void OpenUI() { //if (IsReceiveData) //{ //UIManager.ShowUI(UIInfo.Notice); // IsReceiveData = false; //} } public void CloseWindow() { //UIManager.CloseUI(UIInfo.Notice); } }