CultivateImmortal/Assets/Scripts/GameObject/TxtEntry.cs

46 lines
1.4 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class TxtEntry : MonoBehaviour
{
public Text txtEntry;
public void UpdatePanel(EquipEntry entry,string color= "362211")
{
switch (entry.entryType)
{
case 1:
txtEntry.text = "血量+"+entry.num;
break;
case 2:
txtEntry.text = "攻击力+" + entry.num;
break;
case 3:
txtEntry.text = "防御力+" + entry.num;
break;
case 4:
txtEntry.text = "暴击率+" + entry.num + "%";
break;
case 5:
txtEntry.text = "暴击伤害+" + entry.num + "%";
break;
case 6:
txtEntry.text = "攻击速度+" + entry.num + "%";
break;
case 7:
txtEntry.text = "灵石加成+" + entry.num + "%";
break;
case 8:
txtEntry.text = "抗爆率+" + entry.num + "%";
break;
case 9:
txtEntry.text = "灵气加成+" + entry.num + "%";
break;
}
txtEntry.color = GameMgr.Instance.HexToColor(color);
txtEntry.GetComponent<Outline>().effectColor = GameMgr.Instance.HexToColorAlaph(color);
}
}