mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-16 13:30:10 +00:00
增加Serie部分配置修改时的自刷新
This commit is contained in:
28
Examples/Example_TestSerie.cs
Normal file
28
Examples/Example_TestSerie.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user