You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.1 KiB
50 lines
1.1 KiB
using UnityEngine;
|
|
using TMPro;
|
|
using UnityEngine.UI;
|
|
|
|
public class RareityAutoReroll : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
IVDataFormat.eRarity rareity;
|
|
TextMeshProUGUI txtName;
|
|
Toggle checkBox;
|
|
|
|
public void Init()
|
|
{
|
|
txtName = transform.Find("txtAbility").GetComponent<TextMeshProUGUI>();
|
|
checkBox = transform.Find("CheckBox").GetComponent<Toggle>();
|
|
CheckTextColor();
|
|
}
|
|
|
|
public void Localize()
|
|
{
|
|
if (rareity == IVDataFormat.eRarity.Legend)
|
|
{
|
|
txtName.text = LocalizationText.GetText("awaken_grade_hero_up");
|
|
}
|
|
else if (rareity == IVDataFormat.eRarity.Mystic)
|
|
{
|
|
txtName.text = LocalizationText.GetText("awaken_grade_mystic");
|
|
}
|
|
}
|
|
|
|
public void CheckBoxClick()
|
|
{
|
|
EnhanceMgr.SetAutoRareity(rareity);
|
|
|
|
CheckTextColor();
|
|
}
|
|
|
|
public void CheckTextColor()
|
|
{
|
|
|
|
if (checkBox.isOn)
|
|
{
|
|
txtName.color = Global.CLR_TextYellow;
|
|
}
|
|
else
|
|
{
|
|
txtName.color = new Color(1f, 1f, 1f);
|
|
}
|
|
}
|
|
}
|