animationstate.enabled 是否启用?

2014-12-31 05:22| 发布者: 杨炎| 查看: 2604| 评论: 0|原作者: 蛮牛|来自: yzc88亚洲城脚本manual

摘要: animationstate.enabled 是否启用?varenabled: booldescription描述enables / disables the animation.启动/禁止动画for the animation to take any effect the weight also needs to be set to a value higher tha ...

animationstate.enabled 是否启用?

varenabled: bool

description描述

enables / disables the animation.

启动/禁止动画

for the animation to take any effect the weight also needs to be set to a value higher than zero. if the animation is disabled, time will be paused until the animation is enabled again.

对于需要采用某些效果的动画,权值要设置成为一个大于0的值.如果动画被禁用,在动画再次启用之前,时间(动画)将被暂停.

c#

javascript

using unityengine;

using system.collections;

public class example :monobehaviour{

public void awake() {

animation["walk"].enabled = true;

animation["walk"].weight = 1.0f;

}

}

// enable the walk cycle

// 启用行走动作循环

animation["walk"].enabled = true;

animation["walk"].weight = 1.0;

相关阅读

文章点评
相关文章