Class: Physics

Phaser. Physics

new Physics()

Source:

Classes

Arcade
Body
CollisionGroup
ContactMaterial
InversePointProxy
Material
PointProxy
Spring
World

Members

<static, constant> LIME_CORONA_JSON :number

Type:
  • number
Source:

Methods

setBoundsToWorld(left, right, top, bottom, setCollisionGroup)

Sets the bounds of the Physics world to match the Game.World dimensions. You can optionally set which 'walls' to create: left, right, top or bottom.

Parameters:
Name Type Argument Default Description
left boolean <optional>
true

If true will create the left bounds wall.

right boolean <optional>
true

If true will create the right bounds wall.

top boolean <optional>
true

If true will create the top bounds wall.

bottom boolean <optional>
true

If true will create the bottom bounds wall.

setCollisionGroup boolean <optional>
true

If true the Bounds will be set to use its own Collision Group.

Source:

setWorldMaterial(material, left, right, top, bottom)

Sets the given material against the 4 bounds of this World.

Parameters:
Name Type Argument Default Description
material Phaser.Physics.Material

The material to set.

left boolean <optional>
true

If true will set the material on the left bounds wall.

right boolean <optional>
true

If true will set the material on the right bounds wall.

top boolean <optional>
true

If true will set the material on the top bounds wall.

bottom boolean <optional>
true

If true will set the material on the bottom bounds wall.

Source:

Class: Physics

Phaser. Physics

new Physics()

Source:

Classes

Arcade
Body
CollisionGroup
ContactMaterial
InversePointProxy
Material
PointProxy
Spring
World

Members

<static, constant> LIME_CORONA_JSON :number

Type:
  • number
Source:

Methods

setBoundsToWorld(left, right, top, bottom, setCollisionGroup)

Sets the bounds of the Physics world to match the Game.World dimensions. You can optionally set which 'walls' to create: left, right, top or bottom.

Parameters:
Name Type Argument Default Description
left boolean <optional>
true

If true will create the left bounds wall.

right boolean <optional>
true

If true will create the right bounds wall.

top boolean <optional>
true

If true will create the top bounds wall.

bottom boolean <optional>
true

If true will create the bottom bounds wall.

setCollisionGroup boolean <optional>
true

If true the Bounds will be set to use its own Collision Group.

Source:

setWorldMaterial(material, left, right, top, bottom)

Sets the given material against the 4 bounds of this World.

Parameters:
Name Type Argument Default Description
material Phaser.Physics.Material

The material to set.

left boolean <optional>
true

If true will set the material on the left bounds wall.

right boolean <optional>
true

If true will set the material on the right bounds wall.

top boolean <optional>
true

If true will set the material on the top bounds wall.

bottom boolean <optional>
true

If true will set the material on the bottom bounds wall.

Source:
Phaser Copyright © 2012-2014 Photon Storm Ltd.
Documentation generated by JSDoc 3.3.0-dev on Mon Feb 24 2014 12:11:42 GMT-0000 (GMT) using the DocStrap template.