color.lerp 插值

2015-1-4 22:27| 发布者: 杨炎| 查看: 2162| 评论: 0|原作者: 蛮牛|来自: yzc88亚洲城脚本manual

摘要: color.lerp 插值static functionlerp(a: color,b: color,t: float) : colordescription描述interpolates between colors a and b by t.通过t在颜色a和b之间插值。/t/ is clamped between 0 and 1. when t is 0 retur ...

color.lerp 插值

static functionlerp(a: color,b: color,t: float) : color

description描述

interpolates between colors a and b by t.

通过t在颜色a和b之间插值。

/t/ is clamped between 0 and 1. when t is 0 returns a. when t is 1 returns b.

"t"是夹在0到1之间的值。当t是0时返回颜色a。当t是1时返回颜色b。

c#

javascript

using unityengine;

using system.collections;

public class example :monobehaviour{

public color lerpedcolor = color.white;

void update() {

erpedcolor = color.lerp(color.white, color.black, time.time);

}

}

// converts a white color to a black one trough time.

// 在一个时间段内将白色逐渐转换成黑色。

var lerpedcolor : color = color.white;

function update() {

lerpedcolor = color.lerp(color.white, color.black, time.time);

}

相关阅读

文章点评
相关文章