Chobolabs / spine-cpp

A C++11 runtime for skeletal animation from Spine by Esoteric Software
Other
47 stars 11 forks source link

Anim_Start event behavior. #4

Closed Blttrr closed 8 years ago

Blttrr commented 8 years ago

If there are no playing animations on track, AnimationState::addAnimation method won't fire an Anim_Start callback. AnimationState::setAnimation always fires it.

pharan commented 8 years ago

This is the same behavior as in the official runtime. The fix is to replace addAnimation's direct trackEntry[x] assignment with a setCurrent call which does fire the Start callback.

We haven't applied this to the official runtime yet because the new AnimationState (in the dev branch) is just about ready and already addresses this.

iboB commented 8 years ago

Closing since it mimics the C API