24 lines
757 B
C#
24 lines
757 B
C#
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using GameCore;
|
|
|
|
public class EventLuckMagicDrawButtonView : MonoBehaviour
|
|
{
|
|
[SerializeField] private TMP_Text textCost, textBtn;
|
|
public Button ButtonDraw;
|
|
|
|
public void Init(int cost, EEventLuckMagicRingType ringType)
|
|
{
|
|
textCost.text = $"x{cost}";
|
|
var key = ringType switch
|
|
{
|
|
EEventLuckMagicRingType.OuterRing => EventLuckMagicAct.OuterRingBtnKey,
|
|
EEventLuckMagicRingType.MiddleRing => EventLuckMagicAct.MiddleRingBtnKey,
|
|
EEventLuckMagicRingType.InnerRing => EventLuckMagicAct.InnerRingBtnKey,
|
|
_ => throw new System.NotImplementedException(),
|
|
};
|
|
textBtn.text = LocalizationMgr.GetText(key);
|
|
}
|
|
}
|