22 lines
391 B
C#
22 lines
391 B
C#
using UnityEngine;
|
|
|
|
public class RhythmCat : MonoBehaviour
|
|
{
|
|
Animator anim;
|
|
|
|
private void Awake()
|
|
{
|
|
anim = GetComponent<Animator>();
|
|
}
|
|
|
|
public void Dance(float delay)
|
|
{
|
|
_ = Util.RunDelayed(delay,()=>{anim.SetBool("Dance",true);},this.destroyCancellationToken);
|
|
}
|
|
|
|
public void DanceStop()
|
|
{
|
|
anim.SetBool("Dance",false);
|
|
}
|
|
}
|