-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmain.js
More file actions
17 lines (13 loc) · 792 Bytes
/
main.js
File metadata and controls
17 lines (13 loc) · 792 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
(function(Phaser) {
'use strict';
/* global GameCtrl */
// Create your Phaser game and inject it into the game div.
// We did it in a window.onload event, but you can do it anywhere (requireJS load, anonymous function, jQuery dom ready, - whatever floats your boat)
// We're using a game size of 1024 x 768 here, but you can use whatever you feel makes sense for your game of course.
var game = new Phaser.Game(480, 800, Phaser.AUTO, 'game',false,false);
// Add the States your game has.
// You don't have to do this in the html, it could be done in your Boot state too, but for simplicity I'll keep it here.
game.state.add('Main', GameCtrl.Main);
// Now start the Boot state.
game.state.start('Main');
})(Phaser);