For the spine-c library I'm try to use the
spAnimationState_SetAnimation()
function intead of
spAnimationState_SetAnimationByName()
. I see there is a spAnimation_create() function for which I use like so:
gameState->punchAnim = spAnimation_create("Punch", 2);
I put '2' in as the timelinesCount parameter because my punch animation modify's it's bone's position by rotation and translation. Then, later on I try and set that animation like so:
spAnimationState_setAnimation(stage->player.animationState, 0, gameState->punchAnim, 0);
However, when I go to apply the animation to the skeleton with spAnimationState_apply() my program crashes when it tries to lookup the v-table for the first spTimeline within
gameState->punchAnim
because it's null. I'm wondering if there is another call I'm missing in this library to properly setup animations utilizing straight animation functions instead of doing everything by animation names?