@@ -44,6 +44,7 @@ Phaser.
44
44
- [ Mapping tiles] ( #mapping-tiles )
45
45
- [ Enabling physics bodies] ( #enabling-physics-bodies )
46
46
- [ Collision] ( #collision )
47
+ - [ Debug rendering] ( #debug-rendering )
47
48
- [ Extras] ( #extras )
48
49
- [ Minimum Y Offset] ( #minimum-y-offset )
49
50
- [ Collision pulling] ( #collision-pulling )
@@ -62,10 +63,10 @@ The plugin provides a couple of built in tile slope mappings:
62
63
63
64
- [ Arcade Slopes tileset] ( assets )
64
65
(` arcadeslopes ` )
65
- ([ 16px] ( assets/arcade-slopes-16.png ) ,
66
- [ 32px] ( assets/arcade-slopes-32.png ) ,
67
- [ 64px] ( assets/arcade-slopes-64.png ) ,
68
- [ 128px] ( assets/arcade-slopes-128.png ) )
66
+ ([ 16px] ( https://raw.githubusercontent.com/hexus/phaser-arcade-slopes/master/ assets/arcade-slopes-16.png) ,
67
+ [ 32px] ( https://raw.githubusercontent.com/hexus/phaser-arcade-slopes/master/ assets/arcade-slopes-32.png) ,
68
+ [ 64px] ( https://raw.githubusercontent.com/hexus/phaser-arcade-slopes/master/ assets/arcade-slopes-64.png) ,
69
+ [ 128px] ( https://raw.githubusercontent.com/hexus/phaser-arcade-slopes/master/ assets/arcade-slopes-128.png) )
69
70
- [ Ninja Physics debug tileset] ( https://github.com/photonstorm/phaser/tree/v2.4.7/resources/Ninja%20Physics%20Debug%20Tiles )
70
71
(` ninja ` )
71
72
([ 32px] ( https://raw.githubusercontent.com/photonstorm/phaser/v2.4.7/resources/Ninja%20Physics%20Debug%20Tiles/32px/ninja-tiles32.png ) , [ 64px] ( https://raw.githubusercontent.com/photonstorm/phaser/v2.4.7/resources/Ninja%20Physics%20Debug%20Tiles/64px/ninja-tiles64.png ) )
@@ -121,6 +122,16 @@ game.physics.arcade.collide(player, ground);
121
122
game .physics .arcade .collide (emitter, ground);
122
123
```
123
124
125
+ ### Debug rendering
126
+
127
+ To debug your collision layer, set its debug property to ` true ` .
128
+
129
+ This will overlay the collision shapes of each tile when the layer is rendered.
130
+
131
+ ``` js
132
+ ground .debug = true ;
133
+ ```
134
+
124
135
### Extras
125
136
126
137
#### Minimum Y offset
0 commit comments