using UnityEngine.Playables;
public class MyJoystick : MonoBehaviour
{
PlayableDirector director;
void Start()
{
director = this.transform.GetComponent<PlayableDirector>();
}
private void FixedUpdate()
{
float horizontal = variableJoystick.Horizontal;
float vertical = variableJoystick.Vertical;
//走路动画
if (horizontal == 0 && vertical == 0)
{
director.Pause();
}
else
{
director.Play();
}
}
}
网友评论