From 6934f677b8470a4d13b2609972804a9030561bb1 Mon Sep 17 00:00:00 2001 From: rxdxxxx <447154278@qq.com> Date: Tue, 9 May 2023 18:54:49 +0800 Subject: [PATCH] Update spineAnimation.md Add arguments to the listener function --- docs/tutorials/spineAnimation.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/tutorials/spineAnimation.md b/docs/tutorials/spineAnimation.md index 913ee5cc7..db6f18c69 100644 --- a/docs/tutorials/spineAnimation.md +++ b/docs/tutorials/spineAnimation.md @@ -86,6 +86,10 @@ spine.on('complete', e => { console.log('Animation playback ended', e.name) }) +spine.on('event', (track, e) => { + console.log('Animation event', track ,e) +}) + spine.play('idle') game.scene.addChild(gameObject) ``` @@ -113,3 +117,6 @@ Play animation Stop play +### on(name: 'start' | 'complete' | 'interrupt' | 'end' | 'event', callback:(params: any) => void) +Listening event +