2021-04-08 20:09:59 +08:00
|
|
|
|
using ET;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace ET
|
|
|
|
|
{
|
|
|
|
|
public class MainUIGlobalText:Entity
|
|
|
|
|
{
|
|
|
|
|
public class MainUIGlobalTextAwakeSystem : AwakeSystem<MainUIGlobalText>
|
|
|
|
|
{
|
|
|
|
|
public override void Awake(MainUIGlobalText self)
|
|
|
|
|
{
|
|
|
|
|
Instance = self;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class MainUIGlobalTextUpdateSystem : UpdateSystem<MainUIGlobalText>
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public override void Update(MainUIGlobalText self)
|
|
|
|
|
{
|
|
|
|
|
if (self.txtUi != null)
|
|
|
|
|
{
|
|
|
|
|
if (self.txtUi.m_Effect.playing)
|
|
|
|
|
return;
|
|
|
|
|
if (self.queue.Count > 0)
|
|
|
|
|
{
|
2021-04-11 19:50:39 +08:00
|
|
|
|
string str = self.queue.Dequeue();
|
2021-04-08 20:09:59 +08:00
|
|
|
|
self.txtUi.self.title = str;
|
|
|
|
|
self.txtUi.m_Effect.Play();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static MainUIGlobalText Instance{get;private set;}
|
|
|
|
|
|
|
|
|
|
private Queue<string> queue = new Queue<string>();
|
|
|
|
|
|
|
|
|
|
private FUI_LabelGlobalText txtUi;
|
|
|
|
|
public void Init(string message)
|
|
|
|
|
{
|
|
|
|
|
txtUi =txtUi?? MainUI.GlobalText;
|
|
|
|
|
queue.Enqueue(message);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|