找回密碼
 注冊帳號

掃一掃,訪問微社區

animationstate.enabled 是否啟用?

2014-12-31 05:22| 發布者: 楊炎| 查看: 2881| 評論: 0|原作者: 蠻牛|來自: unity3d腳本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;

相關閱讀

文章點評
相關文章
女校游泳队彩金