Skip to content

Phaser.Physics.Arcade.Components.Debug ​

Phaser v4.1.0 · 英文原文

Scope: static

源码:src/physics/arcade/components/Debug.js#L7
引入版本:3.0.0

静态函数 ​

setDebug ​

<instance> setDebug(showBody, showVelocity, bodyColor) ​

说明:

设置此物理体的调试值。

机构只有在已启用整个Arcade Physics 调试时才会绘制调试。 请注意, 绘制调试显示时需要花费性能, 生产中不应该使用调试 。

参数:

名称类型可选说明
showBodyboolean否设定为 true , 以使此物理体将其大纲变成调试显示 。
showVelocityboolean否设定为 true , 以使此物理体为调试显示制成一个速度标记 。
bodyColornumber否向调试显示器渲染时的物理体轮廓颜色 。

返回值: Phaser.Physics.Arcade.Components.Debug - 此游戏对象 。

源码:src/physics/arcade/components/Debug.js#L20
引入版本:3.0.0


setDebugBodyColor ​

<instance> setDebugBodyColor(value) ​

说明:

设置调试显示时的物理体轮廓颜色。

参数:

名称类型可选说明
valuenumber否向调试显示器渲染时的物理体轮廓颜色 。

返回值: Phaser.Physics.Arcade.Components.Debug - 此游戏对象 。

源码:src/physics/arcade/components/Debug.js#L44
引入版本:3.0.0


静态函数 ​

debugBodyColor ​

debugBodyColor: number ​

说明:

调试显示时的物理体轮廓颜色 。

源码:src/physics/arcade/components/Debug.js#L103
引入版本:3.0.0


debugShowBody ​

debugShowBody: boolean ​

说明:

设定为 true , 以使此物理体将其大纲变成调试显示 。

源码:src/physics/arcade/components/Debug.js#L61
引入版本:3.0.0


debugShowVelocity ​

debugShowVelocity: boolean ​

说明:

设定为 true , 以使此物理体为调试显示制成一个速度标记 。

源码:src/physics/arcade/components/Debug.js#L82
引入版本:3.0.0



社区翻译