Arcade

.Physics. Arcade

Type Definitions

ArcadeBodyBounds

Since:
  • 3.0.0
Properties:
Name Type Description
x number 左边.
y number 上边.
right number 右边.
bottom number 下缘.
Type:
  • object

ArcadeBodyCollision

Since:
  • 3.0.0
Properties:
Name Type Description
none boolean 如果物体没有碰撞,则为真.
up boolean 如果物体的上边缘发生碰撞,则为True.
down boolean 如果物体在其下边缘碰撞,则为True.
left boolean 如果物体在其左边缘碰撞,则为True.
right boolean 如果物体在其右边碰撞,则为True.
Type:
  • object

ArcadeColliderType

Since:
  • 3.0.0
街机物理对撞机类型.
Type:

ArcadeWorldConfig

Since:
  • 3.0.0
Properties:
Name Type Attributes Default Description
fps number <optional>
60 Sets Phaser.Physics.Arcade.World#fps.
fixedStep boolean <optional>
true Sets Phaser.Physics.Arcade.World#fixedStep.
timeScale number <optional>
1 Sets Phaser.Physics.Arcade.World#timeScale.
gravity Phaser.Types.Math.Vector2Like <optional>
Sets Phaser.Physics.Arcade.World#gravity.
x number <optional>
0 Sets 界限.x.
y number <optional>
0 Sets 界限.y.
width number <optional>
0 Sets 界限.width.
height number <optional>
0 Sets 界限.height.
checkCollision Phaser.Types.Physics.Arcade.CheckCollisionObject <optional>
Sets Phaser.Physics.Arcade.World#checkCollision.
overlapBias number <optional>
4 Sets Phaser.Physics.Arcade.World#OVERLAP_BIAS.
tileBias number <optional>
16 Sets Phaser.Physics.Arcade.World#TILE_BIAS.
forceX boolean <optional>
false Sets Phaser.Physics.Arcade.World#forceX.
isPaused boolean <optional>
false Sets Phaser.Physics.Arcade.World#isPaused.
debug boolean <optional>
false Sets Phaser.Physics.Arcade.World#debug.
debugShowBody boolean <optional>
true Sets debugShowBody.
debugShowStaticBody boolean <optional>
true Sets debugShowStaticBody.
debugShowVelocity boolean <optional>
true Sets debugShowStaticBody.
debugBodyColor number <optional>
0xff00ff Sets bodyDebugColor.
debugStaticBodyColor number <optional>
0x0000ff Sets staticBodyDebugColor.
debugVelocityColor number <optional>
0x00ff00 Sets velocityDebugColor.
maxEntries number <optional>
16 Sets Phaser.Physics.Arcade.World#maxEntries.
useTree boolean <optional>
true Sets Phaser.Physics.Arcade.World#useTree.
customUpdate boolean <optional>
false 如果启用,您需要自己调用 `World.update` .
Type:
  • object

ArcadeWorldDefaults

Since:
  • 3.0.0
Properties:
Name Type Description
debugShowBody boolean 设置为 `true` 以向调试显示呈现动态正文轮廓.
debugShowStaticBody boolean 设置为 `true` 以向调试显示呈现静态正文轮廓.
debugShowVelocity boolean 设置为 `true` 以将身体速度标记渲染到调试显示.
bodyDebugColor number 呈现给调试显示时动态正文轮廓的颜色.
staticBodyDebugColor number 呈现给调试显示时静态主体轮廓的颜色.
velocityDebugColor number 渲染到调试显示时速度标记的颜色.
Type:
  • object

ArcadeWorldTreeMinMax

Since:
  • 3.0.0
Properties:
Name Type Description
minX number RTree搜索中使用的最小x值.
minY number RTree搜索中使用的最小y值.
maxX number RTree搜索中使用的最大x值.
maxY number RTree搜索中使用的最大y值.
Type:
  • object

CheckCollisionObject

Since:
  • 3.0.0
Properties:
Name Type Description
up boolean 物体会与世界边界的顶端相撞吗?
down boolean 物体会与世界边界的底部碰撞吗?
left boolean 物体会与世界左边界碰撞吗?
right boolean 物体会与世界边界的右侧碰撞吗?
Type:
  • object

GameObjectWithBody

Properties:
Name Type Description
body Phaser.Physics.Arcade.Body | Phaser.Physics.Arcade.StaticBody
Type:
  • object

GameObjectWithDynamicBody

Properties:
Name Type Description
body Phaser.Physics.Arcade.Body
Type:
  • object

GameObjectWithStaticBody

Properties:
Name Type Description
body Phaser.Physics.Arcade.StaticBody
Type:
  • object

ImageWithDynamicBody

Properties:
Name Type Description
body Phaser.Physics.Arcade.Body
Type:
  • object

ImageWithStaticBody

Properties:
Name Type Description
body Phaser.Physics.Arcade.StaticBody
Type:
  • object

PhysicsGroupConfig

Since:
  • 3.0.0
Properties:
Name Type Attributes Default Description
collideWorldBounds boolean <optional>
false Sets Phaser.Physics.Arcade.Body#collideWorldBounds.
customBoundsRectangle Phaser.Geom.Rectangle <optional>
null Sets setBoundsRectangle.
accelerationX number <optional>
0 Sets acceleration.x.
accelerationY number <optional>
0 Sets acceleration.y.
allowDrag boolean <optional>
true Sets Phaser.Physics.Arcade.Body#allowDrag.
allowGravity boolean <optional>
true Sets Phaser.Physics.Arcade.Body#allowGravity.
allowRotation boolean <optional>
true Sets Phaser.Physics.Arcade.Body#allowRotation.
bounceX number <optional>
0 Sets bounce.x.
bounceY number <optional>
0 Sets bounce.y.
dragX number <optional>
0 Sets drag.x.
dragY number <optional>
0 Sets drag.y.
enable boolean <optional>
true Sets enable.
gravityX number <optional>
0 Sets gravity.x.
gravityY number <optional>
0 Sets