备份CatanBuilding瘦身独立工程
This commit is contained in:
40
Assets/Scripts/EventStrikeLucky/EventLuckMagicInfoPanel.cs
Normal file
40
Assets/Scripts/EventStrikeLucky/EventLuckMagicInfoPanel.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using GameCore;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class EventLuckMagicInfoPanel : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private TMP_Text textExplore, textItemTransform;
|
||||
[SerializeField] private RewardItemNew[] ring;
|
||||
[SerializeField] private RewardItemNew TaskRewardUpper, TaskRewardLower;
|
||||
[SerializeField] private Button btnClose;
|
||||
private const string Key = "UI_EventSandDigPanel_7";
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
btnClose.onClick.AddListener(OnClickClose);
|
||||
}
|
||||
|
||||
public void Init(EventLuckMagicInfo info)
|
||||
{
|
||||
textExplore.text = LocalizationMgr.GetText(EventLuckMagicAct.OuterRingBtnKey);
|
||||
textItemTransform.text = LocalizationMgr.GetFormatTextValue(Key, LocalizationMgr.GetText(info.TicketNameKey));
|
||||
TaskRewardUpper.SetData(info.TaskRewardUpper);
|
||||
TaskRewardLower.SetData(info.TaskRewardLower);
|
||||
for (int i = 0; i < ring.Length; i++)
|
||||
ring[i].SetData(info.Blocks[i]);
|
||||
}
|
||||
|
||||
private void OnClickClose()
|
||||
{
|
||||
UIManager.Instance.DestroyUI(UITypes.EventLuckMagicInfoPanel);
|
||||
}
|
||||
}
|
||||
|
||||
public class EventLuckMagicInfo
|
||||
{
|
||||
public string TicketNameKey;
|
||||
public ItemData[] Blocks;
|
||||
public ItemData TaskRewardUpper, TaskRewardLower;
|
||||
}
|
||||
Reference in New Issue
Block a user