diff --git a/Examples/Example_Test.cs b/Examples/Example_Test.cs new file mode 100644 index 00000000..0a7e69e1 --- /dev/null +++ b/Examples/Example_Test.cs @@ -0,0 +1,39 @@ +using UnityEngine; +#if INPUT_SYSTEM_ENABLED +using Input = XCharts.Runtime.InputHelper; +#endif +using XCharts.Runtime; + +namespace XCharts.Example +{ + [DisallowMultipleComponent] + [ExecuteInEditMode] + public class Example_Test : MonoBehaviour + { + BaseChart chart; + + void Awake() + { + chart = gameObject.GetComponent(); + } + + void Update() + { + if (Input.GetKeyDown(KeyCode.Space)) + { + AddData(); + } + else if(Input.GetKeyDown(KeyCode.R)) + { + chart.AnimationReset(); + chart.AnimationFadeIn(); + } + } + + void AddData() + { + chart.AnimationReset(); + chart.AnimationFadeOut(); + } + } +} \ No newline at end of file diff --git a/Examples/Example_Test.cs.meta b/Examples/Example_Test.cs.meta new file mode 100644 index 00000000..7ee7459d --- /dev/null +++ b/Examples/Example_Test.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bac63bf58d06d47be8e1759189fbd9ed +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: