-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
71 lines (62 loc) · 1.79 KB
/
index.php
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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>All for the Cove</title>
<style type="text/css">
body {
background-color: black;
}
canvas {
margin: 50px auto;
}
@font-face {
font-family: 'pixellari';
font-style: 'normal';
src: url('fonts/pixellari.ttf');
font-weight: 100;
}
</style>
</head>
<body>
<script src="lib/phaser.min.js"></script>
<script src="js/levels.js"></script>
<script src="js/guiri.js"></script>
<script src="js/chiringuito.js"></script>
<script src="js/baywatcher.js"></script>
<script src="js/trash.js"></script>
<script src="js/rubbish.js"></script>
<script src="js/menu.js"></script>
<script src="js/game.js"></script>
<script src="js/tutorial.js"></script>
<script src="js/languages.js"></script>
<script src="js/audioManager.js"></script>
<p style="font-family: pixellari;">.</p>
<script>
(function() {
<?php if (array_key_exists('d', $_GET)) { ?>
debug = true;
<?php } else { ?>
debug = false;
<?php } ?>
<?php if (array_key_exists('v', $_GET)) { ?>
velocity = <? echo $_GET['v']; ?>;
levels.forEach(function(level) {
level.velocity = level.velocity * velocity;
})
<?php } ?>
scaleFactor = 2;
gameWidth = 480 * scaleFactor;
gameHeight = 270 * scaleFactor;
game = new Phaser.Game(gameWidth, gameHeight, Phaser.AUTO, '');
game.state.add("bootState", bootState);
game.state.add("loadState", loadState);
game.state.add("menuState", menuState);
game.state.add("beforePlayState", beforePlayState);
game.state.add("gameState", gameState);
game.state.add("creditsState", creditsState);
game.state.start("bootState");
})();
</script>
</body>
</html>