AnimationCurve.AddKey 添加键

function AddKey (time : float, value : float) : int

Description描述

Add a new key to the curve.

在曲线中添加一个新键.

Smooth tangents are automatically computed for the key. Returns the index of the added key. If no key could be added because there is already another keyframe at the same time -1 will be returned.

自动为该键计算平滑切线.返回该键的索引,如果此时已存在另一个关键帧,则不能添加键,并返回-1.

另见: keys 变量.

• function AddKey (key : Keyframe ) : int

Description描述

Add a new key to the curve.

添加新键到曲线.

Returns the index of the added key. If no key could be added because there is already another keyframe at the same time -1 will be returned.

返回该键的索引,如果此时已存在另一个关键帧,则不能添加键,并返回-1.

See Also: keys variable, Keyframe struct.

最后修改:2010年12月7日 Tuesday 18:52

本脚本参考基于Unity 3.4.1f5

英文部分版权属©Unity公司所有,中文部分© Unity圣典 版权所有,未经许可,严禁转载 。