Nav apraksta
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

LineArrow.cs 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. using System;
  2. using UnityEngine;
  3. namespace XCharts.Runtime
  4. {
  5. /// <summary>
  6. /// </summary>
  7. [Serializable]
  8. public class LineArrow : ChildComponent, ISerieComponent
  9. {
  10. public enum Position
  11. {
  12. /// <summary>
  13. /// 末端箭头
  14. /// </summary>
  15. End,
  16. /// <summary>
  17. /// 头端箭头
  18. /// </summary>
  19. Start
  20. }
  21. [SerializeField] private bool m_Show;
  22. [SerializeField] private Position m_Position;
  23. [SerializeField]
  24. private ArrowStyle m_Arrow = new ArrowStyle()
  25. {
  26. width = 10,
  27. height = 15,
  28. offset = 0,
  29. dent = 3
  30. };
  31. /// <summary>
  32. /// Whether to show the arrow.
  33. /// |是否显示箭头。
  34. /// </summary>
  35. public bool show
  36. {
  37. get { return m_Show; }
  38. set { if (PropertyUtil.SetStruct(ref m_Show, value)) SetVerticesDirty(); }
  39. }
  40. /// <summary>
  41. /// The position of arrow.
  42. /// |箭头位置。
  43. /// </summary>
  44. public Position position
  45. {
  46. get { return m_Position; }
  47. set { if (PropertyUtil.SetStruct(ref m_Position, value)) SetVerticesDirty(); }
  48. }
  49. /// <summary>
  50. /// the arrow of line.
  51. /// |箭头。
  52. /// </summary>
  53. public ArrowStyle arrow
  54. {
  55. get { return m_Arrow; }
  56. set { if (PropertyUtil.SetClass(ref m_Arrow, value)) SetVerticesDirty(); }
  57. }
  58. }
  59. }