Physics.Ninja.Tile

Class: Phaser.Physics.Ninja.Tile

Constructor

new Tile(body, x, y, width, height, type)

Ninja Physics Tile constructor.
A Tile is defined by its width, height and type. It's type can include slope data, such as 45 degree slopes, or convex slopes.
Understand that for any type including a slope (types 2 to 29) the Tile must be SQUARE, i.e. have an equal width and height.
Also note that as Tiles are primarily used for levels they have gravity disabled and world bounds collision disabled by default.

Note: This class could be massively optimised and reduced in size. I leave that challenge up to you.

Parameters
Name Type Argument Default Description
登录查看完整内容