mirror of
https://github.com/wassname/phaser.git
synced 2026-08-11 11:23:06 +08:00
Velocity integration tidied up. Now moving to sync Body with Sprite center point.
This commit is contained in:
@@ -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);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user