找回密码
 立即注册
楼主: 海蓝

[常见问题] unity怎么判断动画结束?

[复制链接]
发表于 2013-1-9 16:34 | 显示全部楼层 |阅读模式
有两个相机动画,想循环这来回播放,应该怎么处理代码啊?我想的是先判断animation播放结束在播放animation2,可惜没成功,呜呜,求救啊,各位大爷!!
发表于 2013-1-9 17:22 | 显示全部楼层
// Plays an animation only if we are not playing it already.
function OnMouseEnter() {
    if (!animation.isPlaying)
        animation.Play();
}
第二种:
// Plays an animation only if we are not playing it already.
function OnMouseEnter() {
    if (!animation.IsPlaying("mouseOverEffect"))
        animation.Play("mouseOverEffect");
}

点评

收藏了 谢谢  详情 回复 发表于 2013-1-9 19:34
发表于 2013-1-9 19:34 | 显示全部楼层
monery8 发表于 2013-1-9 17:22
// Plays an animation only if we are not playing it already.
function OnMouseEnter() {
    if (!an ...

收藏了 谢谢
发表于 2017-2-13 13:48 | 显示全部楼层
顶顶多好
发表于 2017-2-13 13:30 | 显示全部楼层
说的非常好
发表于 2017-2-13 13:42 | 显示全部楼层
很好哦
发表于 2017-2-13 13:05 | 显示全部楼层
不错不错
发表于 2017-2-13 13:15 | 显示全部楼层
LZ真是人才
发表于 2017-2-19 08:04 | 显示全部楼层
很不错
 楼主| 发表于 2017-2-19 07:25 | 显示全部楼层
难得一见的好帖
懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Unity开发者联盟 ( 粤ICP备20003399号 )

GMT+8, 2024-5-2 23:51 , Processed in 1.044008 second(s), 26 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表