using PhxhSDK; using System.Collections; using System.Collections.Generic; using UnityEngine; public class ScrollNoticeManager : Singlenton { bool allowNotice = true; public Queue receives = new Queue(); public void AddNotice(string notice) { receives.Enqueue(notice); DebugUtil.Log("添加滚动公告:" + notice); } public void ShowNotice() { if (receives.Count > 0 && allowNotice) { string notice = receives.Dequeue(); DebugUtil.Log("滚动公告:" + notice); } } public void ClearNotice() { receives.Clear(); } }