| 478 | } |
| 479 | |
| 480 | void DragonBone::setShowDebug(bool var) { |
| 481 | AssertIf(_flags.isOn(Node::Cleanup), "can not operate on an invalid DragonBone"); |
| 482 | if (var) { |
| 483 | if (!_debugLine) { |
| 484 | _debugLine = Line::create(); |
| 485 | _debugLine->setOrder(std::numeric_limits<int>::max()); |
| 486 | addChild(_debugLine); |
| 487 | } |
| 488 | } else { |
| 489 | if (_debugLine) { |
| 490 | _debugLine->removeFromParent(); |
| 491 | _debugLine = nullptr; |
| 492 | } |
| 493 | } |
| 494 | Node::setShowDebug(var); |
| 495 | } |
| 496 | |
| 497 | DragonBone::DBArmatureProxy* DragonBone::getArmatureProxy() const noexcept { |
| 498 | return _armatureProxy.get(); |