bingo 项目提交
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
using BingoBrain.Core;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class JTipsModel : BaseModel
|
||||
{
|
||||
#region 生命周期
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnReset()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
|
||||
private Queue<TipsData> tipsDatas = new();
|
||||
|
||||
public void AddTips(TipsData tipsData)
|
||||
{
|
||||
if (tipsDatas.Count > 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
tipsDatas.Enqueue(tipsData);
|
||||
}
|
||||
|
||||
public TipsData GetTips()
|
||||
{
|
||||
if (tipsDatas.Count > 0)
|
||||
{
|
||||
return tipsDatas.Dequeue();
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user