[c] fixed bug in spAnimationState_addPropertyID, didn't keep track of #properties. Closes #774

This commit is contained in:
badlogic 2016-11-24 15:01:23 +01:00
parent a0f0e2ee1f
commit 7fc9d1a26a
2 changed files with 3 additions and 2 deletions

View File

@ -786,6 +786,7 @@ int _spAnimationState_addPropertyID(spAnimationState* self, int id) {
_spAnimationState_ensureCapacityPropertyIDs(self, internal->propertyIDsCount + 1);
internal->propertyIDs[internal->propertyIDsCount] = id;
internal->propertyIDsCount++;
return 1;
}

View File

@ -67,8 +67,8 @@ bool SpineboyExample::init () {
skeletonNode->setMix("walk", "jump", 0.4);
skeletonNode->setMix("jump", "run", 0.4);
skeletonNode->setAnimation(0, "walk", true);
spTrackEntry* jumpEntry = skeletonNode->addAnimation(0, "jump", false, 3);
skeletonNode->addAnimation(0, "run", true);
spTrackEntry* jumpEntry = skeletonNode->addAnimation(0, "jump", false, 1);
skeletonNode->addAnimation(0, "run", true);
skeletonNode->setTrackStartListener(jumpEntry, [] (spTrackEntry* entry) {
log("jumped!");