FaBaoSkillWidget.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using Core.Language;
  2. using Excel2Json;
  3. using GameLogic.Hero;
  4. using Utility;
  5. namespace Fort23.Mono
  6. {
  7. [UIBinding(prefab = "FaBaoSkillWidget")]
  8. public partial class FaBaoSkillWidget : UIComponent
  9. {
  10. private void Init()
  11. {
  12. }
  13. public override void AddEvent()
  14. {
  15. }
  16. public override void DelEvent()
  17. {
  18. }
  19. public override void AddButtonEvent()
  20. {
  21. }
  22. public void CustomInit(FaBaoInfo currentFabaoInfo, FaBaoInfo fabaoInfo)
  23. {
  24. Text_Level.text = fabaoInfo.FabaoPowerupConfig.ID + "级";
  25. Text_Desc.text = UtilTools.GetString(LanguageManager.Instance.Text(fabaoInfo.SkillConfig.PromoteLan), fabaoInfo.SkillConfig.PromoteLanPara);
  26. if (currentFabaoInfo.FabaoPowerupConfig.ID + 1 == fabaoInfo.FabaoPowerupConfig.ID)
  27. {
  28. Icon_CurrentUpGrade.gameObject.SetActive(true);
  29. }
  30. else
  31. {
  32. Icon_CurrentUpGrade.gameObject.SetActive(false);
  33. }
  34. if (currentFabaoInfo.FabaoPowerupConfig.ID >= fabaoInfo.FabaoPowerupConfig.ID)
  35. {
  36. Text_Desc.transform.RecoverColor();
  37. Text_Level.transform.RecoverColor();
  38. }
  39. else
  40. {
  41. Text_Level.transform.Gray();
  42. Text_Desc.transform.Gray();
  43. }
  44. }
  45. }
  46. }