|
|
@@ -261,6 +261,21 @@ Animation* AnimationTarget::createAnimation(const char* id, Properties* animatio
|
|
|
animation = createAnimation(id, propertyId, keyCount, keyTimes, keyValues, (Curve::InterpolationType) curve);
|
|
|
}
|
|
|
|
|
|
+ const char* repeat = animationProperties->getString(ANIMATION_REPEAT_COUNT_STR);
|
|
|
+ if (repeat)
|
|
|
+ {
|
|
|
+ if (strcmp(repeat, ANIMATION_INDEFINITE_STR) == 0)
|
|
|
+ {
|
|
|
+ animation->getClip()->setRepeatCount(AnimationClip::REPEAT_INDEFINITE);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ float value;
|
|
|
+ sscanf(repeat, "%f", &value);
|
|
|
+ animation->getClip()->setRepeatCount(value);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
SAFE_DELETE_ARRAY(keyOut);
|
|
|
SAFE_DELETE_ARRAY(keyIn);
|
|
|
SAFE_DELETE_ARRAY(keyValues);
|
|
|
@@ -277,7 +292,7 @@ Animation* AnimationTarget::createAnimation(const char* id, Properties* animatio
|
|
|
}
|
|
|
animation->createClips(animationProperties, (unsigned int) frameCount);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return animation;
|
|
|
}
|
|
|
|