mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-25 18:30:14 +00:00
重命名为xcharts
This commit is contained in:
23
Demo.cs
Normal file
23
Demo.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using UnityEngine;
|
||||
using xcharts;
|
||||
|
||||
public class Demo : MonoBehaviour
|
||||
{
|
||||
private LineChart lineChart;
|
||||
private float time;
|
||||
|
||||
void Awake () {
|
||||
lineChart = transform.Find("line_chart").GetComponent<LineChart>();
|
||||
}
|
||||
|
||||
void Update () {
|
||||
time += Time.deltaTime;
|
||||
if (time >= 1)
|
||||
{
|
||||
time = 0;
|
||||
lineChart.AddPoint("fps", Random.Range(24.0f, 60.0f));
|
||||
lineChart.AddPoint("rtt", Random.Range(15, 30));
|
||||
lineChart.AddPoint("ping", Random.Range(0, 100));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user