-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
56 lines (44 loc) · 1.38 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Super Flappy Land 2 - 6 Golden Flaps</title>
<style>
#game_div {
width: 400px;
margin: auto;
margin-top: 50px;
border:1px solid #444;
}
#rules{width:400px;margin:0 auto;color:#fff;margin-top:5px;text-align:center;}
#logo{
margin:0 auto;
width:312px;
display:block;
}
body{background:#000;}
</style>
<script type="text/javascript" src="phaser.min.js"></script>
<script src="Boot.js"></script>
<script src="Preloader.js"></script>
<script src="Game.js"></script>
</head>
<body>
<div id="game_div"> </div>
<div id='rules'>Space to jump</div>
<script>
window.onload = function() {
// Create your Phaser game and inject it into the gameContainer div.
// 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)
var game = new Phaser.Game(400, 490, Phaser.AUTO, 'game_div');
// 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('Game', BasicGame.Game);
// Now start the Boot state.
game.state.start('Boot');
};
</script>
</body>
</html>