mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-16 21:40:41 +00:00
同步更新部分示例代码对按键的读取逻辑
简化了部分协同程序的使用逻辑
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
|
||||
#if INPUT_SYSTEM_ENABLED
|
||||
using Input = XCharts.Runtime.InputHelper;
|
||||
#endif
|
||||
namespace XCharts.Example
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
@@ -18,7 +20,7 @@ namespace XCharts.Example
|
||||
{
|
||||
chart = gameObject.AddComponent<CandlestickChart>();
|
||||
}
|
||||
GenerateOHLC(dataCount);
|
||||
AddData();
|
||||
}
|
||||
|
||||
void Update()
|
||||
@@ -29,9 +31,7 @@ namespace XCharts.Example
|
||||
}
|
||||
}
|
||||
|
||||
void AddData() { }
|
||||
|
||||
void GenerateOHLC(int count)
|
||||
void AddData()
|
||||
{
|
||||
chart.ClearData();
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace XCharts.Example
|
||||
var boxVals = new float[4];
|
||||
var dayRange = 12;
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
for (int i = 0; i < dataCount; i++)
|
||||
{
|
||||
baseValue = baseValue + Random.Range(0f, 1f) * 30 - 10;
|
||||
for (int j = 0; j < 4; j++)
|
||||
|
||||
Reference in New Issue
Block a user