Animation.Sample 采样
function Sample () : 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.
当你明确想设置一些动画状态并且对它取样一次的时候有用。
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;
最后修改:2011年1月12日 Wednesday 22:34