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变量

  • stringParameter
    String parameter that is stored in the event and will be sent to the function.
    字符串参数,保持在事件中并发送给函数
  • floatParameter
    Float parameter that is stored in the event and will be sent to the function.
    浮点型参数,保持在事件中并发送给函数
  • intParameter
    int parameter that is stored in the event and will be sent to the function.
    整型参数, 保持在事件中并发送给函数
  • objectReferenceParameter
    Object reference parameter that is stored in the event and will be sent to the function.
    引用对象参数,保持在事件中并发送给函数
  • functionName
    The name of the function that will be called.
    欲调用的函数的名字
  • time
    The time at which the event will be fired off.
    引发该事件的时间
  • messageOptions
    Function call options.
    函数调用选项
  • animationState
    The animation state that fired this event (Read Only).
    引发事件时的函数状态(只读)

Constructors构造器

  • AnimationEvent
    Creates a new animation event
    创建新的动画事件


,