-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
38 lines (25 loc) · 1020 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<title>hello phaser!</title>
<script src="//cdn.jsdelivr.net/phaser/2.5.0/phaser.min.js"></script>
</head>
<body>
<script type="text/javascript">
window.onload = function() {
// Note that this html file is set to pull down Phaser 2.5.0 from the JS Delivr CDN.
// Although it will work fine with this tutorial, it's almost certainly not the most current version.
// Be sure to replace it with an updated version before you start experimenting with adding your own code.
var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create });
function preload () {
game.load.image('logo', 'assets/img/phaser.png');
}
function create () {
var logo = game.add.sprite(game.world.centerX, game.world.centerY, 'logo');
logo.anchor.setTo(0.5, 0.5);
}
};
</script>
</body>
</html>