public float time ;

描述

将触发该事件的时间。

AnimationEvent 从其附加到的剪辑中获取时间长度。 时间属性确定处理该事件的时间。例如,如果该剪辑的长度为 2 秒钟,并且将 time 设置为 1.5f,则在此应用程序启动后会 1.5 秒调用此函数, 然后每 2 秒调用此函数。AnimationEvent 页上的示例演示了如何使用 time 属性。