mirror of https://github.com/axmolengine/axmol.git
Merge pull request #13163 from fusijie/fix_spritebatchnode_debugdraw
add IF-CASE to fix debug draw under SpriteBatchNode.
This commit is contained in:
commit
8239d26b4a
|
@ -430,6 +430,10 @@ void Sprite::setTextureRect(const Rect& rect, bool rotated, const Size& untrimme
|
||||||
|
|
||||||
void Sprite::debugDraw(bool on)
|
void Sprite::debugDraw(bool on)
|
||||||
{
|
{
|
||||||
|
if (_batchNode) {
|
||||||
|
log("Sprite doesn't support denbug draw when using SpriteBatchNode");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
DrawNode* draw = getChildByName<DrawNode*>("debugDraw");
|
DrawNode* draw = getChildByName<DrawNode*>("debugDraw");
|
||||||
if(on)
|
if(on)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue