30 lines
451 B
C#
30 lines
451 B
C#
using UnityEngine;
|
|
|
|
public class MegaTestAnimator : MonoBehaviour
|
|
{
|
|
private MegaMorphAnimator anim;
|
|
|
|
private void Update()
|
|
{
|
|
if (anim == null)
|
|
{
|
|
anim = GetComponent<MegaMorphAnimator>();
|
|
}
|
|
if ((bool)anim)
|
|
{
|
|
if (Input.GetKeyDown(KeyCode.Alpha1))
|
|
{
|
|
anim.PlayClip(0);
|
|
}
|
|
if (Input.GetKeyDown(KeyCode.Alpha2))
|
|
{
|
|
anim.PlayClip(1);
|
|
}
|
|
if (Input.GetKeyDown(KeyCode.Alpha3))
|
|
{
|
|
anim.PlayClip(2);
|
|
}
|
|
}
|
|
}
|
|
}
|