phaser/examples/wip/book/part1.html
Richard Davey e43571980d Book files
2013-11-19 00:25:55 +00:00

35 lines
No EOL
545 B
HTML

<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8" />
<title>Creating a game in Phaser, part 1</title>
<script src="phaser.js"></script>
</head>
<body>
<div id="gameContainer"></div>
<script type="text/javascript">
window.onload = function() {
var game = new Phaser.Game(1024, 768, Phaser.AUTO, 'gameContainer', { preload: preload, create: create });
function preload () {
game.load.image('background', 'images/picture.png');
}
function create () {
game.add.sprite(0, 0, 'background');
}
};
</script>
</body>
</html>