From c8cb47da63fb03a9b41f1831a9b034251e8c8b09 Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Sun, 3 Sep 2023 22:34:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0Example=5FTest=E8=B0=83?= =?UTF-8?q?=E8=AF=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Examples/Example_Test.cs | 39 +++++++++++++++++++++++++++++++++++ Examples/Example_Test.cs.meta | 11 ++++++++++ 2 files changed, 50 insertions(+) create mode 100644 Examples/Example_Test.cs create mode 100644 Examples/Example_Test.cs.meta 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: