2021-05-25 01:14:19 +08:00
|
|
|
using Cal.DataTable;
|
|
|
|
using FairyGUI;
|
2021-04-08 20:09:59 +08:00
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
2021-05-25 01:14:19 +08:00
|
|
|
using UnityEngine;
|
2021-04-08 20:09:59 +08:00
|
|
|
|
|
|
|
namespace ET
|
|
|
|
{
|
2021-05-25 01:14:19 +08:00
|
|
|
public class NoticeUIAwakeSyatem: AwakeSystem<NoticeUI>
|
2021-04-08 20:09:59 +08:00
|
|
|
{
|
|
|
|
public override void Awake(NoticeUI self)
|
|
|
|
{
|
|
|
|
self.Awake();
|
|
|
|
}
|
|
|
|
}
|
2021-05-25 01:14:19 +08:00
|
|
|
|
|
|
|
public class NoticeUIDestroySyatem: DestroySystem<NoticeUI>
|
2021-04-08 20:09:59 +08:00
|
|
|
{
|
|
|
|
public override void Destroy(NoticeUI self)
|
|
|
|
{
|
|
|
|
self.Destroy();
|
|
|
|
}
|
|
|
|
}
|
2021-05-25 01:14:19 +08:00
|
|
|
|
|
|
|
public class NoticeUI: Entity
|
2021-04-08 20:09:59 +08:00
|
|
|
{
|
|
|
|
public FUI_NoticeUI ui;
|
2021-05-25 01:14:19 +08:00
|
|
|
public Action<bool> OnClickDonnotShowBtn;
|
2021-04-20 00:25:04 +08:00
|
|
|
private Scene zoneScene;
|
2023-09-07 00:06:37 +08:00
|
|
|
private bool isDisplay;
|
2021-06-01 17:25:35 +08:00
|
|
|
private const string filePath = "Assets/Download/Config/updateNotice1.txt";
|
|
|
|
|
2021-04-08 20:09:59 +08:00
|
|
|
public void Awake()
|
|
|
|
{
|
2021-04-20 00:25:04 +08:00
|
|
|
zoneScene = this.ZoneScene();
|
2021-04-08 20:09:59 +08:00
|
|
|
ui = GetParent<FUI_NoticeUI>();
|
|
|
|
AwakeAsync().Coroutine();
|
|
|
|
}
|
2021-05-25 01:14:19 +08:00
|
|
|
|
2021-04-08 20:09:59 +08:00
|
|
|
private async ETVoid AwakeAsync()
|
|
|
|
{
|
2023-09-07 00:06:37 +08:00
|
|
|
this.isDisplay = true;
|
|
|
|
this.ui.m_btnNotDisplay.self.selected = !this.isDisplay;
|
2021-05-25 01:14:19 +08:00
|
|
|
this.ui.m_btnNotDisplay.self.onClick.Set(() =>
|
2021-04-08 20:09:59 +08:00
|
|
|
{
|
2023-09-07 00:06:37 +08:00
|
|
|
this.isDisplay = !this.isDisplay;
|
|
|
|
OnClickDonnotShowBtn?.Invoke(this.isDisplay);
|
2021-04-08 20:09:59 +08:00
|
|
|
});
|
2021-05-25 01:14:19 +08:00
|
|
|
string text = (await ResourceHelper.LoadAssetAsync<TextAsset>(filePath)).text;
|
2023-09-07 00:06:37 +08:00
|
|
|
ui.m_comText.title = text;
|
2021-04-08 20:09:59 +08:00
|
|
|
await ETTask.CompletedTask;
|
|
|
|
}
|
2021-05-25 01:14:19 +08:00
|
|
|
|
2021-04-08 20:09:59 +08:00
|
|
|
public void Destroy()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
2021-05-25 01:14:19 +08:00
|
|
|
}
|