AnimationEvent 动画事件
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, a string, an object reference, or an AnimationEvent.
动画事件支持没有或有一个参数的函数.参数可以是浮点型,字符串,引用对象或AnimationEvent。
Variables变量
- stringParameterString parameter that is stored in the event and will be sent to the function.
字符串参数,保持在事件中并发送给函数 - floatParameterFloat parameter that is stored in the event and will be sent to the function.
浮点型参数,保持在事件中并发送给函数 - intParameterint parameter that is stored in the event and will be sent to the function.
整型参数, 保持在事件中并发送给函数 - objectReferenceParameterObject reference parameter that is stored in the event and will be sent to the function.
引用对象参数,保持在事件中并发送给函数 - functionNameThe name of the function that will be called.
欲调用的函数的名字 - timeThe time at which the event will be fired off.
引发该事件的时间 - messageOptionsFunction call options.
函数调用选项 - animationStateThe animation state that fired this event (Read Only).
引发事件时的函数状态(只读)
Constructors构造器
- AnimationEventCreates a new animation event
创建新的动画事件