Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17076

setDebugDrawMask to DEBUGDRAW_NONE

$
0
0

@RetryAgain wrote:

If you set the mask to none (DEBUGDRAW_NONE) and you have not already set the mask your program will terminate.
The following code is safe

function gameClass:debugNone()
    local pw = cc.Director:getInstance():getRunningScene():getPhysicsWorld()
    if pw:getDebugDrawMask() ~= cc.PhysicsWorld.DEBUGDRAW_NONE then 
        pw:setDebugDrawMask(cc.PhysicsWorld.DEBUGDRAW_NONE) 
    end
end

Good luck
Andre

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 17076

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>