forked from ultrabolido/PrinceJS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
108 lines (100 loc) · 3.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8" />
<title>PrinceJS - An HTML5 port of Prince of Persia</title>
<script src="lib/phaser.js"></script>
<script src="src/Boot.js"></script>
<script src="src/Preloader.js"></script>
<script src="src/Game.js"></script>
<script src="src/Utils.js"></script>
<script src="src/Title.js"></script>
<script src="src/EndTitle.js"></script>
<script src="src/Credits.js"></script>
<script src="src/Cutscene.js"></script>
<script src="src/Scene.js"></script>
<script src="src/Level.js"></script>
<script src="src/LevelBuilder.js"></script>
<script src="src/Actor.js"></script>
<script src="src/Fighter.js"></script>
<script src="src/Marley.js"></script>
<script src="src/Enemy.js"></script>
<script src="src/Kid.js"></script>
<script src="src/Interface.js"></script>
<script src="src/tiles/Base.js"></script>
<script src="src/tiles/Star.js"></script>
<script src="src/tiles/Clock.js"></script>
<script src="src/tiles/Torch.js"></script>
<script src="src/tiles/Spikes.js"></script>
<script src="src/tiles/Loose.js"></script>
<script src="src/tiles/Button.js"></script>
<script src="src/tiles/ExitDoor.js"></script>
<script src="src/tiles/Gate.js"></script>
<script src="src/tiles/Potion.js"></script>
<script src="src/tiles/Sword.js"></script>
<script src="src/tiles/Chopper.js"></script>
<style>
body {
background: url(img/marley.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
position: relative;
}
html, body {
margin: 0;
height: 100%;
overflow: hidden
}
body {
position: relative;
}
#gameContainer {
position: absolute;
top: 100px;
left: 30px;
}
#controls {
position: absolute;
bottom: 20px;
left: 30px;
width: 640px;
text-align: center;
color: white;
}
#logo {
position: absolute;
top: 20px;
left: 30px;
width: 640px;
}
</style>
</head>
<body>
<div id="gameContainer"></div>
<img id="logo" src="img/logo.png" />
<div id="controls">
<span>Lopen: Pijltje links/rechts<span><br/>
<span>Springen of Verdedigen: Pijltje omhoog<span><br/>
<span>Bukken of Wapen weg: Pijltje naar beneden<span><br/>
<span>Roep Marley: Pijltje naar beneden<span><br/>
<span>Steken: Shift<span><br/>
<span>Level opnieuw: R van Restart<span><br/>
</div>
<div id="help" class="help">?</div>
<script type="text/javascript">
window.onload = function() {
var game = new Phaser.Game(640, 400, Phaser.AUTO, 'gameContainer',null,false,false);
game.state.add('Boot', PrinceJS.Boot);
game.state.add('Preloader', PrinceJS.Preloader);
game.state.add('Game', PrinceJS.Game);
game.state.add('Title', PrinceJS.Title);
game.state.add('EndTitle', PrinceJS.EndTitle);
game.state.add('Credits', PrinceJS.Credits);
game.state.add('Cutscene', PrinceJS.Cutscene);
game.state.start('Boot');
};
</script>
</body>
</html>