增加Example_Test调试用

This commit is contained in:
monitor1394
2023-09-03 22:34:43 +08:00
parent 66d666192a
commit c8cb47da63
2 changed files with 50 additions and 0 deletions

39
Examples/Example_Test.cs Normal file
View File

@@ -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<BaseChart>();
}
void Update()
{
if (Input.GetKeyDown(KeyCode.Space))
{
AddData();
}
else if(Input.GetKeyDown(KeyCode.R))
{
chart.AnimationReset();
chart.AnimationFadeIn();
}
}
void AddData()
{
chart.AnimationReset();
chart.AnimationFadeOut();
}
}
}