graph chart引入&骑行结果弹窗
This commit is contained in:
1 parent
40d118cea3
commit
96f3644b5b
2374 files changed
+485161
-2410
No files matched your search
@@ -0,0 +1,42 @@
|
||||
#define Graph_And_Chart_PRO
|
||||
using UnityEngine;
|
||||
using ChartAndGraph;
|
||||
|
||||
/// <summary>
|
||||
/// this tutorial follows the same pattern the graph tutorial goes. The only diffrence is that candle values are used.
|
||||
/// the values are in the follwing order : open high low close , start time , time durtaion
|
||||
/// </summary>
|
||||
public class CandleChartFeed : MonoBehaviour
|
||||
{
|
||||
float time = 3f;
|
||||
float x = 10f;
|
||||
|
||||
void Start()
|
||||
{
|
||||
CandleChart candle = GetComponent<CandleChart>();
|
||||
if (candle != null)
|
||||
{
|
||||
candle.DataSource.StartBatch();
|
||||
candle.DataSource.ClearCategory("Player 1");
|
||||
for (int i = 0; i < 30; i++)
|
||||
{
|
||||
candle.DataSource.AddCandleToCategory("Player 1", new CandleChartData.CandleValue(Random.Range(5f, 10f), Random.Range(10f, 15f), Random.Range(0f, 5f), Random.Range(5f, 10f), i * 10f / 30f, Random.value * 10f / 30f));
|
||||
}
|
||||
|
||||
candle.DataSource.EndBatch();
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
time -= Time.deltaTime;
|
||||
if (time <= 0)
|
||||
{
|
||||
time = 3f;
|
||||
x += 0.3f;
|
||||
CandleChart candle = GetComponent<CandleChart>();
|
||||
candle.DataSource.AddCandleToCategory("Player 1", new CandleChartData.CandleValue(Random.Range(5f, 10f), Random.Range(10f, 15f), Random.Range(0f, 5f), Random.Range(5f, 10f), x, Random.value * 10f / 30f), 1f);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a443a8b0aa95c294f8af741a4668151d
|
||||
timeCreated: 1504359855
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e17d3b367294aad4c86311cf61108a32
|
||||
timeCreated: 1505838971
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in new issue
Block a user