Hi,
I'm using Spine for animation in my game. I tried to preload animation by creating SkeletonData then create SkeletonAnimation from it. This is what I tried:
spAtlas* atlas = spAtlas_createFromFile("skill_poison.atlas", 0);
CCASSERT(atlas, "Error reading atlas file.");
spSkeletonJson* json = spSkeletonJson_create(atlas);
SkeletonData* skeletonData = spSkeletonJson_readSkeletonDataFile(json, "skill_poison.json");
CCASSERT(skeletonData, json->error ? json->error : "Error reading skeleton data file.");
spSkeletonJson_dispose(json);
SkeletonAnimation* animation = SkeletonAnimation::createWithData(skeletonData);
The problem is there's a glitch(a short pause) when the animation first time played. Then when I create and start the animation second time and so on, there're no glitch. Please give me advice. Thanks.