-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
66 lines (52 loc) · 2.01 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE HTML>
<html>
<head>
<title>Platforms - JumpUp!</title>
<meta charset="utf-8">
<script src="phaser.min.js"></script>
<script type="text/javascript">
var levels = [];
</script>
<script type="text/javascript" src="js/boot.js"></script>
<script type="text/javascript" src="js/preloader.js"></script>
<script type="text/javascript" src="js/game.js"></script>
<script type="text/javascript" src="js/levelfinished.js"></script>
<script type="text/javascript" src="js/mainmenu.js"></script>
<script type="text/javascript" src="levels/level1.js"></script>
<script type="text/javascript" src="levels/level2.js"></script>
</head>
<body>
<div id="game"></div>
<script type="text/javascript">
var game = new Phaser.Game(640, 480, Phaser.AUTO, 'game');
// The Google WebFont Loader will look for this object, so create it before loading the script.
WebFontConfig = {
// 'active' means all requested fonts have finished loading
// We set a 1 second delay before calling 'createText'.
// For some reason if we don't the browser cannot render the text the first time it's created.
active: function() {
game.fontLoaded = true;
},
// The Google Fonts we want to load (specify as many as you like in the array)
google: { families: [ 'Roboto Slab:700,400:latin' ] }
};
if (document.readyState === 'complete' || document.readyState === 'interactive')
{
start();
}
else
{
document.addEventListener('DOMContentLoaded', start, false);
}
function start () {
document.removeEventListener('DOMContentLoaded', start, false);
game.state.add('Boot', Jumpup.Boot);
game.state.add('Preloader', Jumpup.Preloader);
game.state.add('Game', Jumpup.Game);
game.state.add('LevelFinished', Jumpup.LevelFinished);
game.state.add('MainMenu', Jumpup.MainMenu);
game.state.start('Boot');
}
</script>
</body>
</html>