报告事件(ReportedEvent)
表示由 Rive 报告的事件,例如来自编辑器的自定义事件。
字段(Fields)
delaySeconds
delaySeconds: number
事件触发距今多久,单位为秒:从事件关键帧到报告该事件的动画本次 advance 结束的时间。由状态或监听器(而非关键帧)触发的事件为 0。
local event = context:asReportedEvent()
if event then
print(event.delaySeconds)
end
name
name: string
报告事件的名称。
properties
properties: table
与事件关联的属性表。