From 73cf3921dab092c9e568a59d246b0a4c6ef8dffa Mon Sep 17 00:00:00 2001 From: Justin Worthe Date: Mon, 21 Apr 2014 12:37:58 +0200 Subject: Added missing template file used by Grunt build --- templates/_main.js.tpl | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 templates/_main.js.tpl diff --git a/templates/_main.js.tpl b/templates/_main.js.tpl new file mode 100644 index 0000000..0b1ddb9 --- /dev/null +++ b/templates/_main.js.tpl @@ -0,0 +1,12 @@ +'use strict'; + +//global variables +window.onload = function () { + var game = new Phaser.Game(<%= gameWidth %>, <%= gameHeight %>, Phaser.AUTO, '<%= _.slugify(projectName) %>'); + + // Game States + <% _.forEach(gameStates, function(gameState) { %>game.state.add('<%= gameState.shortName %>', require('./states/<%= gameState.shortName %>')); + <% }); %> + + game.state.start('boot'); +}; \ No newline at end of file -- cgit v1.2.3