找回密碼
 注冊帳號

掃一掃,訪問微社區

animationcurve.animationcurve 動畫曲線

2014-12-31 03:42| 發布者: 楊炎| 查看: 2351| 評論: 0|原作者: 蠻牛|來自: unity3d腳本manual

摘要: animationcurve.animationcurve 動畫曲線static functionanimationcurve(params keys: keyframe) : animationcurvedescription描述creates an animation curve from arbitrary number of keyframes.根據任意數量的關 ...

animationcurve.animationcurve 動畫曲線

static functionanimationcurve(params keys: keyframe[]) : animationcurve

description描述

creates an animation curve from arbitrary number of keyframes.

根據任意數量的關鍵幀創建一個動畫曲線.

this creates a curve from variable number ofkeyframeparameters. if you want to create curve from an array of keyframes, create an empty curve and assignkeysproperty.

該函數根據關鍵幀參數創建曲線.如果你想從一個關鍵幀數組中創建一個曲線.創建一個曲線并賦值鍵屬性.

c#

javascript

using unityengine;

using system.collections;

public class example :monobehaviour{

public animationcurve curve = new animationcurve(new keyframe(0, 0), new keyframe(1, 1));

void update() {

transform.position.x = time.time;

transform.position.y = curve.evaluate(time.time);

}

}

// an ease in, ease out animation curve (tangents are all flat)

// 一個漸入漸出的動畫曲線(切線都是平直的)

var curve = new animationcurve( keyframe (0, 0), keyframe (1, 1));

function update () {

transform.position.x = time.time ;

transform.position.y = curve.evaluate( time.time );

}

o static functionanimationcurve() : animationcurve

description描述

creates an empty animation curve

創建一個空的動畫曲線.

相關閱讀

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