RedDotKeyData.cs 924 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System;
  2. using Sirenix.OdinInspector;
  3. using Sirenix.Serialization;
  4. namespace YIUIFramework
  5. {
  6. [HideLabel]
  7. [HideReferenceObjectPicker]
  8. [Serializable]
  9. public class RedDotKeyData
  10. {
  11. [LabelText("Id")]
  12. [LabelWidth(50)]
  13. [MinValue(1)]
  14. [TableColumnWidth(150, resizable: false)]
  15. [ShowInInspector]
  16. [OdinSerialize]
  17. public int Id { get; internal set; } = 1;
  18. [LabelText("描述")]
  19. [LabelWidth(50)]
  20. [ShowInInspector]
  21. [OdinSerialize]
  22. public string Des { get; internal set; }
  23. private RedDotKeyData()
  24. {
  25. }
  26. public RedDotKeyData(int id)
  27. {
  28. Id = id;
  29. }
  30. public RedDotKeyData(int id, string des)
  31. {
  32. Id = id;
  33. Des = des;
  34. }
  35. public void ChangeDes(string des)
  36. {
  37. Des = des;
  38. }
  39. }
  40. }