mirror of https://github.com/axmolengine/axmol.git
Fixed ParticleSystem may using wrong texture if the particle PLIST file created via ParticleDesigner.
This commit is contained in:
parent
902f1696e8
commit
9f5a36b817
|
@ -367,7 +367,7 @@ bool ParticleSystem::initWithDictionary(ValueMap& dictionary, const std::string&
|
|||
|
||||
Texture2D *tex = nullptr;
|
||||
|
||||
if (textureName.length() > 0)
|
||||
if (!textureName.empty())
|
||||
{
|
||||
// set not pop-up message box when load image failed
|
||||
bool notify = FileUtils::getInstance()->isPopupNotify();
|
||||
|
@ -404,7 +404,7 @@ bool ParticleSystem::initWithDictionary(ValueMap& dictionary, const std::string&
|
|||
CCASSERT(isOK, "CCParticleSystem: error init image with Data");
|
||||
CC_BREAK_IF(!isOK);
|
||||
|
||||
setTexture(Director::getInstance()->getTextureCache()->addImage(image, textureName.c_str()));
|
||||
setTexture(Director::getInstance()->getTextureCache()->addImage(image, _plistFile + textureName));
|
||||
|
||||
image->release();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue