- 수정됨
Get SkeletonAnimation from EventListener
Hi,
I have an array of 'SkeletonAnimation' objects. Each of them has a start listener and complete listener. When the listeners are triggered, they give me back an 'spTrackEntry' but I cannot see how to get the 'SkeletonAnimation' back that triggered the listener. Is this possible?
Currently, no, it's not possible. The reason is that spTrackEntry lacks a field that lets you add user specific data. I've added a void* userData field to spTrackEntry. When you queue an animation, just set your SkeletonAnimation in that field, and fetch it back out in your listener! You can get the fix from the latest master repository commit. See [c] Added void* userData field to spTrackEntry. Can be fetched in lis…@95527b6
Ok great, that'll do! Thanks.
heh I remember hacking around this 2 years ago
Y U NO SEND PR?! ¯_(ツ)_/¯