API Docs for: 1.13.1
Show:

game.World Class

Extends game.Class
Module: physics

Physics world.

Constructor

game.World

(
  • x
  • y
)

Parameters:

  • x Number

    Gravity x

  • y Number

    Gravity y

Methods

addBody

(
  • body
)

Add body to world.

Parameters:

addBodyCollision

(
  • body
)

Add body to collision group.

Parameters:

collide

(
  • body
)

Collide body against it's collideAgainst groups.

Parameters:

removeBody

(
  • body
)

Remove body from world.

Parameters:

removeBodyCollision

(
  • body
)

Remove body from collision group.

Parameters:

update

()

Update physics world.

Properties

bodies

Array

List of bodies in world.

collisionGroups

Object

List of collision groups.

gravity

game.Vector

Gravity of physics world.

Default: 0,980