mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-02 08:42:43 +08:00
clear debug draw when disable collision debug draw
This commit is contained in:
@@ -385,6 +385,7 @@ cc.js.getset(CollisionManager.prototype, 'enabledDebugDraw',
|
||||
cc.director.on(cc.Director.EVENT_AFTER_SCENE_LAUNCH, this.onSceneLaunched, this);
|
||||
}
|
||||
else if (!value && this._enabledDebugDraw) {
|
||||
this._debugDrawer.clear();
|
||||
cc.director.getScene()._sgNode.removeChild(this._debugDrawer);
|
||||
cc.director.off(cc.Director.EVENT_AFTER_SCENE_LAUNCH, this.onSceneLaunched, this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user