phaserjs / phaser

Phaser is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering.
https://phaser.io
MIT License
36.94k stars 7.08k forks source link

Cannot control color/fill of sprite body's debug shape #970

Closed psalaets closed 10 years ago

psalaets commented 10 years ago

The color string and filled flag passed to Phaser.Utils.Debug#body seem to be ignored in 2.0.5 and dev branch.

Example: http://jsfiddle.net/psalaets/u4jUL/1/

Problem is due to param order mismatch in Phaser.Utils.Debug#body. It calls

Phaser.Physics.Arcade.Body.render(context, body, color, filled);

but expected params are

function (context, body, filled, color)

Any valid color string is truthy so it always renders a filled rect. Analogous thing happens to the last param.

psalaets commented 10 years ago

Fixed by PR #971