Version: 2022.3

AnimationCurve

class in UnityEngine

切换到手册

描述

保存可随时间评估的 Keyframes 的集合。

变量

keys动画曲线中定义的所有关键点。
length曲线中的关键点数量。(只读)
postWrapMode最后一个关键帧之后的动画行为。
preWrapMode第一个关键帧之前的动画行为。
this[int]检索索引处的关键点。(只读)

构造函数

AnimationCurve从任意数量的关键帧创建动画曲线。

公共函数

AddKey将一个新关键点添加到曲线中。
ClearKeysErases all KeyFrame from this instance of the AnimationCurve.
CopyFromCopies the keys and properties of the specified AnimationCurve object into this instance of the AnimationCurve class.
Evaluate评估在 time 的曲线。
MoveKey移除 index 处的关键帧,然后插入关键点。
RemoveKey移除一个关键点。
SmoothTangents在 index 处平滑关键帧的进和出切线。

静态函数

ConstantCreates a constant "curve" starting at timeStart, ending at timeEnd, and set to the value value.
EaseInOut创建一条以 timeStart, valueStart 开始、在 timeEnd, valueEnd 结束的缓入缓出曲线。
Linear以 timeStart, valueStart 开始、在 timeEnd, valueEnd 结束的直线。