备份CatanBuilding瘦身独立工程
This commit is contained in:
27
Assets/Scripts/InfiniteBuilding/CampInfoPanel.cs
Normal file
27
Assets/Scripts/InfiniteBuilding/CampInfoPanel.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
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));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user