mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-25 18:30:14 +00:00
3.0 - unitypackage
This commit is contained in:
63
Runtime/Component/Child/LineArrow.cs
Normal file
63
Runtime/Component/Child/LineArrow.cs
Normal file
@@ -0,0 +1,63 @@
|
||||
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class LineArrow : ChildComponent, ISerieExtraComponent
|
||||
{
|
||||
public enum Position
|
||||
{
|
||||
/// <summary>
|
||||
/// 末端箭头
|
||||
/// </summary>
|
||||
End,
|
||||
/// <summary>
|
||||
/// 头端箭头
|
||||
/// </summary>
|
||||
Start
|
||||
}
|
||||
[SerializeField] private bool m_Show;
|
||||
[SerializeField] Position m_Position;
|
||||
[SerializeField]
|
||||
private ArrowStyle m_Arrow = new ArrowStyle()
|
||||
{
|
||||
width = 10,
|
||||
height = 15,
|
||||
offset = 0,
|
||||
dent = 3
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Whether to show the arrow.
|
||||
/// 是否显示箭头。
|
||||
/// </summary>
|
||||
public bool show
|
||||
{
|
||||
get { return m_Show; }
|
||||
set { if (PropertyUtil.SetStruct(ref m_Show, value)) SetVerticesDirty(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// The position of arrow.
|
||||
/// 箭头位置。
|
||||
/// </summary>
|
||||
public Position position
|
||||
{
|
||||
get { return m_Position; }
|
||||
set { if (PropertyUtil.SetStruct(ref m_Position, value)) SetVerticesDirty(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// the arrow of line.
|
||||
/// 箭头。
|
||||
/// </summary>
|
||||
public ArrowStyle arrow
|
||||
{
|
||||
get { return m_Arrow; }
|
||||
set { if (PropertyUtil.SetClass(ref m_Arrow, value)) SetVerticesDirty(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user