NLDClient-yudde/ProjectNLD/Assets/Code/Scripts/Gameplay/SubSystems/ScrollNoticeManager.cs

31 lines
666 B
C#

using PhxhSDK;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ScrollNoticeManager : Singlenton<ScrollNoticeManager>
{
bool allowNotice = true;
public Queue<string> receives = new Queue<string>();
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();
}
}