如何阻止动画仪中的动画播放而不禁用它
写什么代码以停止播放,例如我想要 Animatorz.play(“跳跃”); 我想阻止它如何? 另外,我已经试图在动画中建立一个空的状态,但它只是扮演着两个。
例如,我写动画。播放我要它停止
What code to write for it to stop playing for example I want
animatorz.Play("Jump");
and I want to stop it how?
Also I already tried to make a empty state in anim but it just plays both of them.
For example I write anim.play i want it to stop so i do anim.stop which isnt possible and making an empty state it plays both of them
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
方法1:
首先播放动画:
Animation.play(“跳跃”);
暂停跳跃动画:
pauseTime = animation [“跳跃”]。时间;
动画[“跳跃”]。stop();
继续跳跃动画:
动画[“跳跃”]。时间= pauseTime;
animation.play(“跳跃”);
方法2:非常简单地
播放动画:
animation.play(“跳跃”);
暂停动画:
动画[“跳跃”]。速度= 0;
继续动画:
动画[“跳跃”]。速度= 1;
Method 1: Somewhat complicated
Play the animation first:
animation.Play("Jump");
Pause the jump animation:
pausetime=animation["Jump"].time;
animation["Jump"].Stop();
Continue jumping animation:
animation["Jump"].time=pausetime;
animation.Play("Jump");
Method 2: Very simple
Play the animation first:
animation.Play("Jump");
Pause animation:
animation["Jump"].speed=0;
Continue the animation:
animation["Jump"].speed=1;