Velocity integration tidied up. Now moving to sync Body with Sprite center point.

This commit is contained in:
photonstorm
2014-01-28 01:29:35 +00:00
parent fbe508ab1b
commit 90c09374af
10 changed files with 291 additions and 316 deletions
+10 -1
View File
@@ -1,5 +1,5 @@
var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create, update: update });
var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render });
function preload() {
@@ -40,3 +40,12 @@ function collisionHandler (obj1, obj2) {
game.stage.backgroundColor = '#992d2d';
}
function render() {
// game.debug.renderBodyInfo(sprite1, 16, 16);
game.debug.renderPolygon(sprite1.body.polygons);
game.debug.renderPolygon(sprite2.body.polygons);
}