I am trying to figure out a way to cycle through animations randomly after they finish. I would like to use coroutines but my particular code is working through loops that start after a collision is detected and the coroutine keeps updating and messes up the cycle. Does anyone have an idea of what I should try to do?
Randomly cycle though animations
Could you use an Event? Add a "finished" event trigger to the end of every animation in Spine, and then write a method that plays a random animation when that event is triggered.
hmm that is a good idea I will give that a try. Thank you!
AnimationState has complete, end, and other events you can listen for.
Ah yes, I forgot about those events. Even better, just use them