physics.setDebugErrorsEnabled()

类型 函数
physics.*
返回值 null
版本 版本 2024.3703
关键词 Box2D、内部、断言、错误
请参阅 physics.getDebugErrorsEnabled()

概述

此函数允许捕获 Box2D 中的更多物理错误。

疑难解答

此功能目前仅适用于适用于 macOS 的 Corona 模拟器。

语法

physics.setDebugErrorsEnabled( enabled )
enabled (必需)

布尔值. 允许捕获 Box2D 中的更多物理错误。

示例

-- Toggle extra physics errors for debugging
if ( physics.getDebugErrorsEnabled() ) then
    physics.setDebugErrorsEnabled( false )
else
    physics.setDebugErrorsEnabled( true )
end