2013-10-28 23:29:04 +00:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8" />
|
|
|
|
<title>Phaser Basic Project Template</title>
|
2013-11-06 16:46:21 +00:00
|
|
|
<script src="phaser.min.js"></script>
|
2013-10-28 23:29:04 +00:00
|
|
|
<script src="Boot.js"></script>
|
|
|
|
<script src="Preloader.js"></script>
|
|
|
|
<script src="MainMenu.js"></script>
|
|
|
|
<script src="Game.js"></script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<div id="gameContainer"></div>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
window.onload = function() {
|
|
|
|
|
|
|
|
// Create your Phaser game and inject it into the gameContainer div.
|
2013-11-06 16:46:21 +00:00
|
|
|
// 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)
|
2013-10-28 23:29:04 +00:00
|
|
|
var game = new Phaser.Game(1024, 768, Phaser.AUTO, 'gameContainer');
|
|
|
|
|
|
|
|
// 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('Boot', BasicGame.Boot);
|
|
|
|
game.state.add('Preloader', BasicGame.Preloader);
|
|
|
|
game.state.add('MainMenu', BasicGame.MainMenu);
|
|
|
|
game.state.add('Game', BasicGame.Game);
|
|
|
|
|
|
|
|
// Now start the Boot state.
|
|
|
|
game.state.start('Boot');
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|