HeroAttributeWidget.cs 980 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. namespace Fort23.Mono
  2. {
  3. public class HeroAttributeData
  4. {
  5. public string name;
  6. public string currentValue;
  7. public string nextValue;
  8. public HeroAttributeData(string name, string currentValue, string nextValue)
  9. {
  10. this.name = name;
  11. this.currentValue = currentValue;
  12. this.nextValue = nextValue;
  13. }
  14. }
  15. [UIBinding(prefab = "HeroAttributeWidget")]
  16. public partial class HeroAttributeWidget : UIComponent
  17. {
  18. private void Init()
  19. {
  20. }
  21. public override void AddEvent()
  22. {
  23. }
  24. public override void DelEvent()
  25. {
  26. }
  27. public override void AddButtonEvent()
  28. {
  29. }
  30. public void CustomInit(HeroAttributeData data)
  31. {
  32. Text_Name.text = data.name;
  33. Text_Value.text = data.currentValue;
  34. Text_NextValue.text = data.nextValue;
  35. }
  36. }
  37. }