FaBaoSkillWidget.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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_Select.gameObject.SetActive(true);
  29. // }
  30. // else
  31. // {
  32. // Icon_Select.gameObject.SetActive(false);
  33. // }
  34. // if (currentFabaoInfo.FabaoPowerupConfig.ID >= fabaoInfo.FabaoPowerupConfig.ID)
  35. // {
  36. // Icon_Marsk.gameObject.SetActive(false);
  37. //
  38. // }
  39. // else
  40. // {
  41. // Icon_Marsk.gameObject.SetActive(true);
  42. // }
  43. if (currentFabaoInfo.FabaoPowerupConfig.ID >= fabaoInfo.FabaoPowerupConfig.ID)
  44. {
  45. csc.ChangeState(1);
  46. // Text_Level.transform.Gray();
  47. // Text_Desc.transform.Gray();
  48. }
  49. else
  50. {
  51. csc.ChangeState(0);
  52. // Text_Desc.transform.RecoverColor();
  53. // Text_Level.transform.RecoverColor();
  54. }
  55. }
  56. }
  57. }