用户工具

站点工具


侧边栏



Unity3D中文文档

script:unityengine:classes:animationevent:animationevent

AnimationEvent 动画事件

Description 描述

AnimationEvent lets you call a script function similar to SendMessage as part of playing back an animation.

AnimationEvent类似于SendMessage让你调用一个脚本函数,这个脚本是动画播放的一部分

Animation events support functions that take zero or one parameter. The parameter can be a float, an int, a string, an object reference, or an AnimationEvent.

动画事件函数支持0参数或一个参数,参数可以是浮点型,字符串,object或AnimationEvent。

Variables 变量

animationStateThe animation state that fired this event (Read Only).
该事件引发的动画状态(只读)。
animatorClipInfoThe animator clip info related to this event (Read Only).
与此事件有关的动画器剪辑信息(只读)。
animatorStateInfoThe animator state info related to this event (Read Only).
有关该事件的动画器状态信息(只读)。
floatParameterFloat parameter that is stored in the event and will be sent to the function.
浮点型参数,储存在该事件中并发送给函数。
functionNameThe name of the function that will be called.
被调用的函数的名称。
intParameterInt parameter that is stored in the event and will be sent to the function.
整数型参数,储存在事件中并发送给函数。
isFiredByAnimatorReturns true if this Animation event has been fired by an Animator component.
如果该动画事件已经由Animator组件触发,返回true。
isFiredByLegacyReturns true if this Animation event has been fired by an Animation component.
如果该动画事件已经由Animation组件触发,返回true。
messageOptionsFunction call options.
函数调用选项。
objectReferenceParameterObject reference parameter that is stored in the event and will be sent to the function.
储存在事件中的引用对象参数,并发送给函数。
stringParameterString parameter that is stored in the event and will be sent to the function.
储存在该事件中的字符串参数,并发送给函数。
timeThe time at which the event will be fired off.
引发该事件的时间点。

Constructors 构造器

AnimationEventCreates a new animation event.
创建一个新的动画事件。
script/unityengine/classes/animationevent/animationevent.txt · 最后更改: 2016/08/02 05:32 (外部编辑)