mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +08:00
[c] fixed bug in spAnimationState_addPropertyID, didn't keep track of #properties. Closes #774
This commit is contained in:
parent
a0f0e2ee1f
commit
7fc9d1a26a
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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!");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user