I am having trouble listening for events generated in Spine in Phaser 3. The Phaser 3 implementation is not maintained by esoteric, but maybe someone has an example in JavaScript of an event listener that would work with Phaser 3. Does anyone know how to get it to work?
The event I am trying to hook shows up fine in Spine animation, and in the exported JSON, but nothing I do seems to work for listening to the event firing.
This doesn't work:
spine_Animation01.on(‘middle-of-the-loop’, (spine) => {
console.log(‘Middle of the Loop’)
})
But this works:
spine_Animation01.on(‘complete’, (spine) => {
console.log(‘Loop Completed’)
})
I posted in more detail on the Phaser forums, but have not got a working answer yet: https://phaser.discourse.group/t/how-do-you-listen-for-custom-spine-generated-events/5342