Skip to content

Commit e435719

Browse files
committed
Book files
1 parent b63bd14 commit e435719

3 files changed

Lines changed: 39593 additions & 0 deletions

File tree

77.6 KB
Loading

examples/wip/book/part1.html

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!DOCTYPE HTML>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8" />
5+
<title>Creating a game in Phaser, part 1</title>
6+
<script src="phaser.js"></script>
7+
</head>
8+
<body>
9+
10+
<div id="gameContainer"></div>
11+
12+
<script type="text/javascript">
13+
14+
window.onload = function() {
15+
16+
var game = new Phaser.Game(1024, 768, Phaser.AUTO, 'gameContainer', { preload: preload, create: create });
17+
18+
function preload () {
19+
20+
game.load.image('background', 'images/picture.png');
21+
22+
}
23+
24+
function create () {
25+
26+
game.add.sprite(0, 0, 'background');
27+
28+
}
29+
30+
};
31+
32+
</script>
33+
34+
</body>
35+
</html>

0 commit comments

Comments
 (0)