mirror of
https://github.com/wassname/phaser.git
synced 2026-07-27 11:25:30 +08:00
Added in the game scaling handler and updated Stage
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user