Added in the game scaling handler and updated Stage

This commit is contained in:
Richard Davey
2013-09-09 12:35:09 +01:00
parent 13d6ab512b
commit c904475ae6
8 changed files with 89 additions and 43 deletions
+3 -1
View File
@@ -12,7 +12,7 @@
(function () {
var game = new Phaser.Game(800, 600, Phaser.CANVAS, '', { preload: preload, create: create, render: render });
var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, render: render });
function preload() {
@@ -26,6 +26,8 @@
function create() {
game.stage.backgroundColor = 0xefefef;
// This is just an image that we'll toggle the display of when you click the button
image = game.add.sprite(game.world.centerX, 0, 'beast');
image.anchor.setTo(0.5, 0);