diff options
author | Justin Worthe <justin.worthe@gmail.com> | 2014-04-21 08:43:46 +0200 |
---|---|---|
committer | Justin Worthe <justin.worthe@gmail.com> | 2014-04-21 08:43:46 +0200 |
commit | 1b700b59d6f759e1504c94eb0d378c61b7242da3 (patch) | |
tree | 7b3889e6ae1d22f4551cf56157a3cdeebe31d9c3 /game/main.js | |
parent | 883a678635900b80cd9fc99467cbb31e125a007c (diff) |
Scaffolded Phaser template
Diffstat (limited to 'game/main.js')
-rw-r--r-- | game/main.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/game/main.js b/game/main.js new file mode 100644 index 0000000..0f5208f --- /dev/null +++ b/game/main.js @@ -0,0 +1,16 @@ +'use strict'; + +//global variables +window.onload = function () { + var game = new Phaser.Game(800, 600, Phaser.AUTO, 'interactive-pacbot'); + + // Game States + game.state.add('boot', require('./states/boot')); + game.state.add('gameover', require('./states/gameover')); + game.state.add('menu', require('./states/menu')); + game.state.add('play', require('./states/play')); + game.state.add('preload', require('./states/preload')); + + + game.state.start('boot'); +};
\ No newline at end of file |