diff --git a/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp b/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp index 41bd51d4d1..442d23e501 100644 --- a/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp +++ b/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp @@ -343,7 +343,7 @@ Frame* ActionTimelineCache::loadTextureFrame(const rapidjson::Value& json) path = jsonPath + texture; } - frame->setTexture(path); + frame->setTextureName(path); } return frame; } diff --git a/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.cpp b/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.cpp index ca3b267d32..8e089b2f52 100644 --- a/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.cpp +++ b/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.cpp @@ -108,7 +108,7 @@ TextureFrame* TextureFrame::create() } TextureFrame::TextureFrame() - : _texture("") + : _textureName("") { } @@ -123,12 +123,12 @@ void TextureFrame::onEnter(Frame *nextFrame) { if(_sprite) { - SpriteFrame* spriteFrame = SpriteFrameCache::getInstance()->getSpriteFrameByName(_texture); + SpriteFrame* spriteFrame = SpriteFrameCache::getInstance()->getSpriteFrameByName(_textureName); if(spriteFrame != nullptr) _sprite->setSpriteFrame(spriteFrame); else - _sprite->setTexture(_texture); + _sprite->setTexture(_textureName); } } @@ -136,7 +136,7 @@ void TextureFrame::onEnter(Frame *nextFrame) Frame* TextureFrame::clone() { TextureFrame* frame = TextureFrame::create(); - frame->setTexture(_texture); + frame->setTextureName(_textureName); frame->cloneProperty(this); diff --git a/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.h b/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.h index 4dfd88cfe7..586ef50c7c 100644 --- a/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.h +++ b/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.h @@ -98,12 +98,12 @@ public: virtual void onEnter(Frame *nextFrame) override; virtual Frame* clone() override; - inline void setTexture(std::string texture) { _texture = texture;} - inline std::string getTexture() const { return _texture; } + inline void setTextureName(std::string textureName) { _textureName = textureName;} + inline std::string getTextureName() const { return _textureName; } protected: cocos2d::Sprite* _sprite; - std::string _texture; + std::string _textureName; }; class RotationFrame : public Frame