animation.sample 采样

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

摘要: animation.sample 采样functionsample() : voiddescription描述samples animations at the current state.在当前状态对动画进行采样。this is useful when you explicitly want to set up some animation state, and ...

animation.sample 采样

functionsample() : void

description描述

samples animations at the current state.

在当前状态对动画进行采样。

this is useful when you explicitly want to set up some animation state, and sample it once.

当你明确想设置一些动画状态并且对它取样一次的时候有用。

c#

javascript

using unityengine;

using system.collections;

public class example :monobehaviour{

public void awake() {

animation["myclip"].time = 2.0f;

animation["myclip"].enabled = true;

animation.sample();

animation["myclip"].enabled = false;

}

}

// set up some state;

// 设置一些状态;

animation["myclip"].time = 2.0;

animation["myclip"].enabled = true;

// sample animations now.

// 取样动画。

animation.sample();

animation["myclip"].enabled = false;

文章点评