Hi,
Thank you for the reply again.
What I want to do is to concatenate every animation sequence “smoothly”. It means the new sequence should be played immediately after the play()
.
I’m very confused about the animation switching and I made a sample here:
https://www.dropbox.com/s/puy1jioj12u8m0d/spritesheetdemo.zip?dl=0
This sample has 5 sequences, 30fps, and the duration of each animation frame is 100ms.
I added the event listener to the sprite object so that I can switch to the next animation when the previous sequence is ended.
I also printed every sprite event and the time difference.
catch event: sprite / next : 99.53
catch event: sprite / next : 98.892
catch event: sprite / next : 98.102
catch event: sprite / next : 99.771
catch event: sprite / next : 97.855
catch event: sprite / ended : 99.68
catch event: sprite / began : 33.379
catch event: sprite / next : 99.196
catch event: sprite / next : 99.024
catch event: sprite / next : 98.64
catch event: sprite / next : 98.574
catch event: sprite / next : 99.765
catch event: sprite / next : 99.013
I exepected the new sequence should be played immediately after I called the play()
. But it seems like it’ll delayed 1 corona frame.