备份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,37 @@
using asap.core;
using cfg;
using GameCore;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class EventInfoPopupPanelTitle : MonoBehaviour
{
public int eventItemID;
public string infoTextKey = "UI_EventSandDigPanel_4";
public string tipsTextKey = "UI_EventSandDigPanel_7";
public Image icon;
public TMP_Text text_info;
public TMP_Text text_tips;
private void Reset()
{
text_info = transform.Find("root/info1/text_info").GetComponent<TMP_Text>();
text_tips = transform.Find("root/text_tips").GetComponent<TMP_Text>();
}
private void Start()
{
Tables tables = GContext.container.Resolve<Tables>();
Item item = tables.TbItem.GetOrDefault(eventItemID);
if (item == null)
{
#if UNITY_EDITOR
Debug.LogError($"见大你填错了{gameObject.name},没有这个代币 eventItemID {eventItemID}");
#endif
return;
}
GContext.container.Resolve<IUIService>().SetImageSprite(icon, item.Icon);
string itemName = LocalizationMgr.GetText(item.Name_l10n_key);
text_info.text = LocalizationMgr.GetFormatTextValue(infoTextKey, itemName);
text_tips.text = LocalizationMgr.GetFormatTextValue(tipsTextKey, itemName);
}
}