mirror of https://github.com/axmolengine/axmol.git
Merge pull request #15466 from wefiends/spriteframe-clone
Copy polygonInfo when cloning SpriteFrame
This commit is contained in:
commit
481c55adb2
|
@ -137,6 +137,7 @@ SpriteFrame* SpriteFrame::clone() const
|
||||||
SpriteFrame *copy = new (std::nothrow) SpriteFrame();
|
SpriteFrame *copy = new (std::nothrow) SpriteFrame();
|
||||||
copy->initWithTextureFilename(_textureFilename, _rectInPixels, _rotated, _offsetInPixels, _originalSizeInPixels);
|
copy->initWithTextureFilename(_textureFilename, _rectInPixels, _rotated, _offsetInPixels, _originalSizeInPixels);
|
||||||
copy->setTexture(_texture);
|
copy->setTexture(_texture);
|
||||||
|
copy->setPolygonInfo(_polygonInfo);
|
||||||
copy->autorelease();
|
copy->autorelease();
|
||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue