mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
Update TipsUI.cs
This commit is contained in:
@@ -11,7 +11,7 @@ namespace UI
|
|||||||
protected override void RegisterEvent()
|
protected override void RegisterEvent()
|
||||||
{
|
{
|
||||||
base.RegisterEvent();
|
base.RegisterEvent();
|
||||||
GameEventMgr.Instance.AddEventListener<string>(TipsEvent.Log, TipsUI.Instance.Show);
|
//GameEventMgr.Instance.AddEventListener<string>(TipsEvent.Log, TipsUI.Instance.Show);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -27,6 +27,15 @@ namespace UI
|
|||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
Instance = this;
|
Instance = this;
|
||||||
|
|
||||||
|
AvailablePool = new List<GameObject>();
|
||||||
|
UsedPool = new List<GameObject>();
|
||||||
|
for (int i = 0; i < 5; i++)
|
||||||
|
{
|
||||||
|
AvailablePool.Add(Instantiate(Prefab, Mask.transform));
|
||||||
|
AvailablePool[i].SetActive(false);
|
||||||
|
}
|
||||||
|
GameEventMgr.Instance.AddEventListener<string>(TipsEvent.Log, TipsUI.Instance.Show);
|
||||||
}
|
}
|
||||||
//Prefab
|
//Prefab
|
||||||
public GameObject Prefab;
|
public GameObject Prefab;
|
||||||
@@ -41,13 +50,6 @@ namespace UI
|
|||||||
private float timer2;
|
private float timer2;
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
AvailablePool = new List<GameObject>();
|
|
||||||
UsedPool = new List<GameObject>();
|
|
||||||
for (int i = 0; i < 5; i++)
|
|
||||||
{
|
|
||||||
AvailablePool.Add(Instantiate(Prefab, Mask.transform));
|
|
||||||
AvailablePool[i].SetActive(false);
|
|
||||||
}
|
|
||||||
//GameEventMgr.Instance.AddEventListener<string>(TipsEvent.Log, Show);
|
//GameEventMgr.Instance.AddEventListener<string>(TipsEvent.Log, Show);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user