animationcurve.animationcurve 动画曲线

2014-12-31 03:42| 发布者: 杨炎| 查看: 2232| 评论: 0|原作者: 蛮牛|来自: yzc88亚洲城脚本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

创建一个空的动画曲线.

相关阅读

文章点评
相关文章