【API】Unity5.6 Animation transitions

来源:互联网 发布:java简历 编辑:程序博客网 时间:2024/05/21 00:48

Property

Function

Has Exit Time

可以退出时间

Exit Time is a special transition that doesn’t rely on a parameter. Instead, it relies on the normalized time of the state. Check to make the transition happen at the specific time specified in Exit Time.

退出时间是一个不依赖于参数的特殊转换。他把状态转化的时间依托在状态时段上,等状态结束才会切换状态

Settings

Fold-out menu containing detailed transition settings as below.

Exit Time

退出时间

If Has Exit Time is checked, this value represents the exact time at which the transition can take effect. This is represented in normalized time (for example, an exit time of 0.75 means that on the first frame where 75% of the animation has played, the Exit Time condition is true). On the next frame, the condition is false.

For looped animations, transitions with exit times smaller than 1 are evaluated every loop, so you can use this to time your transition with the proper timing in the animation every loop. 

Transitions with an Exit Time greater than 1 are evaluated only once, so they can be used to exit at a specific time after a fixed number of loops. For example, a transition with an exit time of 3.5 are evaluated once, after three and a half loops.

如果已检查退出时间,则此值表示转换可以生效的确切时间。这在标准化时间中表示(例如,0.75的退出时间意味着在第一帧中,75%的动画已经播放,退出时间条件为true)。在下一帧中,条件为false

对于循环动画,每个循环的退出时间小于1的转换都会对每个循环进行评估,所以您可以使用这个时间来在每个循环中适当地计时0

具有大于1的退出时间的转换仅进行一次评估,因此它们可以在固定数量的循环之后用于特定时间退出。例如,一个退出时间为3.5的转换被求值一次,在三个半循环之后。

Fixed Duration

固定时间

If the Fixed Duration box is checked, the transition time is interpreted in seconds. If the Fixed Duration box is not checked, the transition time is interpreted as a fraction of the normalized time of the source state.

如果选中了固定时间框,则转换时间以秒为单位进行解释。如果固定时间框未选中,则将转换时间解释为源状态的标准化时间的一小部分。

Transition Duration

过度时间

The duration of the transition, in normalized time, relative to the current state’s duration. This is visualized in the transition graph as the portion between the two blue markers

过渡期,在标准化时间内,相对于当前状态的持续时间。这在过渡图中可视为两个蓝色标记之间的部分。.

Transition Offset

过渡偏移

The offset of the time to begin playing in the destination state which is transitioned to. For example, a value of 0.5 means the target state begins playing at 50% of the way through its own timeline.

源状态转换到目标状态过程中的偏移时间。例如,值为0.5意味着目源状态开始以过载50%通过自己的时间线。

Interruption Source

中断源

Use this to control the circumstances under which this transition may be interrupted (see Transition interruption below).

使用此控件可以控制此转换可能中断的情况(请参阅下面的过渡中断)。

Ordered Interruption

命令中断

Determines whether the current transition can be interrupted by other transitions independently of their order (see Transition interruption below).

确定当前转换是否可以独立于其他转化中断(请参阅下面的过渡中断)

Conditions

条件

A transition can have a single condition, multiple conditions, or no conditions at all. If your transition has no conditions, the Unity Editor only considers the Exit Time, and the transition occurs when the exit time is reached. If your transition has one or more conditions, the conditions must all be met before the transition is triggered.

A condition consists of: 

- An event parameter (the value considered in the condition). 
- A conditional predicate (if needed,for example, ‘less than’ or ‘greater than’ for floats). 
- A parameter value (if needed). 

If you have Has Exit Time selected for the transition and have one or more conditions, note that the Unity Editor considers whether the conditions are true after the Exit Time. This allows you to ensure that your transition occurs during a certain portion of the animation.