mirror of https://github.com/axmolengine/axmol.git
fixed read sprite
This commit is contained in:
parent
8174481575
commit
f09b1863a9
|
@ -371,11 +371,11 @@ Node* NodeReader::loadSprite(const rapidjson::Value& json)
|
|||
SpriteFrame* spriteFrame = SpriteFrameCache::getInstance()->getSpriteFrameByName(path);
|
||||
if(!spriteFrame)
|
||||
{
|
||||
path = _jsonPath + path;
|
||||
sprite = Sprite::create(path);
|
||||
}
|
||||
else
|
||||
{
|
||||
path = _jsonPath + path;
|
||||
sprite = Sprite::createWithSpriteFrame(spriteFrame);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue