|
@@ -80,7 +80,7 @@ SkeletonAnimation* SkeletonAnimation::createWithData (spSkeletonData* skeletonDa
|
|
|
|
|
|
SkeletonAnimation* SkeletonAnimation::createWithJsonFile (const std::string& skeletonJsonFile, spAtlas* atlas, float scale) {
|
|
|
SkeletonAnimation* node = new SkeletonAnimation();
|
|
|
- node->initWithJsonFile(skeletonJsonFile, atlas, scale);
|
|
|
+ node->initWithFile(skeletonJsonFile, atlas, scale);
|
|
|
node->autorelease();
|
|
|
return node;
|
|
|
}
|
|
@@ -88,14 +88,14 @@ SkeletonAnimation* SkeletonAnimation::createWithJsonFile (const std::string& ske
|
|
|
SkeletonAnimation* SkeletonAnimation::createWithJsonFile (const std::string& skeletonJsonFile, const std::string& atlasFile, float scale) {
|
|
|
SkeletonAnimation* node = new SkeletonAnimation();
|
|
|
spAtlas* atlas = spAtlas_createFromFile(atlasFile.c_str(), 0);
|
|
|
- node->initWithJsonFile(skeletonJsonFile, atlas, scale);
|
|
|
+ node->initWithFile(skeletonJsonFile, atlas, scale);
|
|
|
node->autorelease();
|
|
|
return node;
|
|
|
}
|
|
|
|
|
|
SkeletonAnimation* SkeletonAnimation::createWithBinaryFile (const std::string& skeletonBinaryFile, spAtlas* atlas, float scale) {
|
|
|
SkeletonAnimation* node = new SkeletonAnimation();
|
|
|
- node->initWithBinaryFile(skeletonBinaryFile, atlas, scale);
|
|
|
+ node->initWithFile(skeletonBinaryFile, atlas, scale);
|
|
|
node->autorelease();
|
|
|
return node;
|
|
|
}
|
|
@@ -103,7 +103,7 @@ SkeletonAnimation* SkeletonAnimation::createWithBinaryFile (const std::string& s
|
|
|
SkeletonAnimation* SkeletonAnimation::createWithBinaryFile (const std::string& skeletonBinaryFile, const std::string& atlasFile, float scale) {
|
|
|
SkeletonAnimation* node = new SkeletonAnimation();
|
|
|
spAtlas* atlas = spAtlas_createFromFile(atlasFile.c_str(), 0);
|
|
|
- node->initWithBinaryFile(skeletonBinaryFile, atlas, scale);
|
|
|
+ node->initWithFile(skeletonBinaryFile, atlas, scale);
|
|
|
node->autorelease();
|
|
|
return node;
|
|
|
}
|
|
@@ -142,8 +142,8 @@ void SkeletonAnimation::update (float deltaTime) {
|
|
|
void SkeletonAnimation::setAnimationStateData (spAnimationStateData* stateData) {
|
|
|
CCASSERT(stateData, "stateData cannot be null.");
|
|
|
|
|
|
- if (_ownsAnimationStateData) spAnimationStateData_dispose(_state->data);
|
|
|
- spAnimationState_dispose(_state);
|
|
|
+ if (_ownsAnimationStateData) spAnimationStateData_dispose(_state->data);
|
|
|
+ spAnimationState_dispose(_state);
|
|
|
|
|
|
_ownsAnimationStateData = false;
|
|
|
_state = spAnimationState_create(stateData);
|