DoTween插件的使用心得

我在我的小羊路线中用到了DoTween这个插件,但是我只会一点他的inspector面板上的参数,对于在脚本中用到这个我还是不会。
但是现在我在脚本中已经学会了怎么暂停DoTween中的动画
我现在学会功能是暂停DoTweenPath的路径

using UnityEngine;

private DoTweenPath dp;
public GameObject pos;
void Start()
{
dp=GetComponent《DoTweenPath》();
}
void Update()
{
if(Vector3.Distance(transform.position,pos.transform.position)<1f)
{
dp.DoPause();//可以暂停动画
}
}

猜你喜欢

转载自blog.csdn.net/vickieyy/article/details/88129862
今日推荐