Files
MinFt/Client/Assets/Scripts/InfiniteBuilding/CampInfoPanel.cs
2026-04-27 12:07:32 +08:00

28 lines
1.0 KiB
C#

using asap.core;
using cfg;
using GameCore;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class CampInfoPanel : MonoBehaviour
{
private TMP_Text _textPrice;
private RewardItemNew _reward;
private Button _btnClose;
private void Awake()
{
_btnClose = transform.Find("btn_close").GetComponent<Button>();
_textPrice = transform.Find("root/info2/btn_construct2/text_cost").GetComponent<TMP_Text>();
_reward = transform.Find("root/info4/reward").GetComponent<RewardItemNew>();
}
private void Start()
{
_btnClose.onClick.AddListener(() => UIManager.Instance.DestroyUI(UITypes.CampInfoPanel));
_textPrice.text = ((int) (GContext.container.Resolve<Tables>().TbMapData.DataMap[114].ConstrutionCost
* GContext.container.Resolve<Tables>().TbConstructionInfiniteConfig.CashMagList[0])).ToString();
_reward.SetData(GContext.container.Resolve<PlayerItemData>().GetItemDataOne(
GContext.container.Resolve<Tables>().TbConstructionInfiniteReward[1].DropID));
}
}