Requested by project owner. Used same pattern for the value as seen in original Animation.cpp.
@@ -7,6 +7,7 @@
#include "Transform.h"
#include "Properties.h"
+#define ANIMATION_INDEFINITE_STR "INDEFINITE"
#define ANIMATION_DEFAULT_CLIP 0
#define ANIMATION_ROTATE_OFFSET 0
#define ANIMATION_SRT_OFFSET 3
@@ -255,7 +256,7 @@ void Animation::createClips(Properties* animationProperties, unsigned int frameC
AnimationClip* clip = createClip(pClip->getId(), ((float) begin / frameCount) * _duration, ((float) end / frameCount) * _duration);
- const char* repeat = pClip->getString(ANIMATION_REPEAT_COUNT_STR);
+ const char* repeat = pClip->getString("repeatCount");
if (repeat)
{
if (strcmp(repeat, ANIMATION_INDEFINITE_STR) == 0)
@@ -5,9 +5,6 @@
#include "Curve.h"
-#define ANIMATION_INDEFINITE_STR "INDEFINITE"
-#define ANIMATION_REPEAT_COUNT_STR "repeatCount"
-
namespace gameplay
@@ -4,6 +4,8 @@
#include "Game.h"
#include "Node.h"
+#define ANIMATION_TARGET_INDEFINITE_STR "INDEFINITE"
+
@@ -261,10 +263,10 @@ 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);
+ const char* repeat = animationProperties->getString("repeatCount");
- if (strcmp(repeat, ANIMATION_INDEFINITE_STR) == 0)
+ if (strcmp(repeat, ANIMATION_TARGET_INDEFINITE_STR) == 0)
animation->getClip()->setRepeatCount(AnimationClip::REPEAT_INDEFINITE);