graph chart引入&骑行结果弹窗

This commit is contained in:
lishuo committed 2021-04-22 19:29:59 +08:00
1 parent 40d118cea3
commit 96f3644b5b
2374 files changed
+485161 -2410

No files matched your search

@@ -0,0 +1,36 @@
#define Graph_And_Chart_PRO
using ChartAndGraph;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class WaveGraph : MonoBehaviour
{
public GraphChart Graph;
public int PointCount = 100;
DoubleVector3[] array;
void Start()
{
array = new DoubleVector3[PointCount];
if (Graph == null) // the ChartGraph info is obtained via the inspector
return;
Graph.DataSource.StartBatch(); // calling StartBatch allows changing the graph data without redrawing the graph for every change
Graph.DataSource.ClearCategory("Player 1"); // clear the "Player 1" category. this category is defined using the GraphChart inspector
for (int i = 0; i < array.Length; i++) //add random points to the graph
{
Graph.DataSource.AddPointToCategory("Player 1", i, Random.value * 20f + 10f); // each time we call AddPointToCategory
}
Graph.DataSource.EndBatch(); // finally we call EndBatch , this will cause the GraphChart to redraw itself
}
void Update()
{
for(int i=0; i<array.Length; i++)
{
array[i] = new DoubleVector3(i, Random.value * 20f, -1.0);
}
Graph.DataSource.SetCategoryArray("Player 1", array,0,array.Length); // set the array each frame
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9dc5b701edd3e304dbd3026f55d93cd6
MonoImporter:
externalObjects: {}
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: a57211cc995667a42a88e29693f26ba5
timeCreated: 1496581373
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant: