Fixed anchor issue with Sprite.body.

This commit is contained in:
photonstorm
2014-02-14 18:06:00 +00:00
parent 291f8ef14c
commit 1097a699c3
3 changed files with 12 additions and 16 deletions
+2 -10
View File
@@ -1,5 +1,5 @@
var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render });
var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create, update: update });
function preload() {
@@ -16,7 +16,7 @@ function create() {
game.world.setBounds(0, 0, 1920, 1200);
var bg = game.add.sprite(0, 0, 'backdrop');
bg.alpha = 0.8;
bg.alpha = 0.4;
ship = game.add.sprite(200, 200, 'ship');
ship.physicsEnabled = true;
@@ -50,11 +50,3 @@ function update() {
}
}
function render() {
// game.debug.renderText('x: ' + box2.body.velocity.x, 32, 32);
// game.debug.renderText('y: ' + box2.body.velocity.y, 32, 64);
}