增加Serie部分配置修改时的自刷新

This commit is contained in:
monitor1394
2023-07-28 08:39:56 +08:00
parent 18c0d3218d
commit ec89828c67
5 changed files with 72 additions and 7 deletions

View File

@@ -0,0 +1,28 @@
using UnityEngine;
using XCharts.Runtime;
#if INPUT_SYSTEM_ENABLED
using Input = XCharts.Runtime.InputHelper;
#endif
namespace XCharts.Example
{
[DisallowMultipleComponent]
public class Example_TestSerie : MonoBehaviour
{
public int maxCache = 100;
BaseChart chart;
int timestamp;
void Awake()
{
chart = gameObject.GetComponent<BaseChart>();
}
void Update()
{
if (Input.GetKeyDown(KeyCode.R))
{
chart.GetSerie(0).radius[1] = Random.Range(50, 80);
chart.SetAllDirty();
}
}
}
}