Skip to content

Commit

Permalink
增加Example_Test调试用
Browse files Browse the repository at this point in the history
  • Loading branch information
monitor1394 committed Sep 3, 2023
1 parent 66d6661 commit c8cb47d
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
39 changes: 39 additions & 0 deletions Examples/Example_Test.cs
Original file line number Diff line number Diff line change
@@ -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();
}
}
}
11 changes: 11 additions & 0 deletions Examples/Example_Test.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c8cb47d

Please sign in to comment.