备份CatanBuilding瘦身独立工程

This commit is contained in:
JSD\13999
2026-05-26 16:15:54 +08:00
commit 2d0e6a61b7
12001 changed files with 2431925 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
using asap.core;
using game;
using GameCore;
using PlayFab.ClientModels;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class NoticePopupPanel : MonoBehaviour
{
public Button btn_close;
public Button btn_close2;
public Button btn_sure;
public TMP_Text text_content;
public TMP_Text text_time;
public TMP_Text text_title;
private void Awake()
{
btn_close = transform.Find("mask").GetComponent<Button>();
btn_close2 = transform.Find("btn_close").GetComponent<Button>();
btn_sure = transform.Find("root/btn_sure/btn_green").GetComponent<Button>();
text_content = transform.Find("root/ScrollView/Viewport/Content/text_content").GetComponent<TMP_Text>();
text_time = transform.Find("root/ScrollView/Viewport/Content/text_time").GetComponent<TMP_Text>();
text_title = transform.Find("root/text_title").GetComponent<TMP_Text>();
}
private void Start()
{
btn_close.onClick.AddListener(OnClose);
btn_sure.onClick.AddListener(OnClose);
btn_close2.onClick.AddListener(OnClose);
TitleNewsEvent titleNewsEvent = new TitleNewsEvent();
titleNewsEvent.show = true;
GContext.Publish(titleNewsEvent);
TitleNewsItem titleNewsItem = titleNewsEvent.titleNewsItem;
if (titleNewsItem != null)
{
text_title.text = titleNewsItem.Title;
text_content.text = titleNewsItem.Body;
text_time.text = titleNewsItem.Timestamp.ToString("dd/MM/yyyy");
}
}
void OnClose()
{
UIManager.Instance.DestroyUI(UITypes.NoticePopupPanel);
}
}