-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
69 lines (57 loc) · 2.65 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
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8"/>
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="expires" content="0"/>
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT"/>
<meta http-equiv="pragma" content="no-cache"/>
<style type="text/css">
@font-face {
font-family: "Western";
src: url(assets/font/old_pixel-7.ttf) format("truetype");
}
</style>
<title>Reflexerado</title>
<link rel="icon" type="image/png" href="assets/favicon.png"/>
</head>
<body>
<script src="node_modules/phaser/build/phaser.js"></script>
<script src="game/boot.js"></script>
<script src="game/preloader.js"></script>
<script src="game/mainMenu.js"></script>
<script src="game/game.js"></script>
<script type="text/javascript">
window.onload = function () {
//var game = new Phaser.Game("100%", "100%", Phaser.AUTO, '');
//var game = new Phaser.Game(640, 512, Phaser.AUTO, '');
var game = new Phaser.Game(1280, 1024, Phaser.AUTO, '');
game.state.add('Boot', Reflexerado.Boot);
game.state.add('Preloader', Reflexerado.Preloader);
game.state.add('MainMenu', Reflexerado.MainMenu);
game.state.add('Game', Reflexerado.Game);
game.state.start('Boot');
if (webmode === true) {
this.document.getElementById("container").style.display = "block";
var btn = document.createElement("button"); // Create a <button> element
var t = document.createTextNode("start game"); // Create a text node
btn.appendChild(t);
this.document.getElementById("start").appendChild(btn).addEventListener('click', function () {
game.state.getCurrentState().playerOneReady = true;
game.state.getCurrentState().playerTwoReady = true;
this.style.display = "none";
}, false);
this.document.getElementById("control-webmode").style.display = "block";
this.document.getElementById("sound").style.display = "block";
}
};
</script>
<div id="container" style="display:none">
<h1 id="start" style="font-family:Western; font-size: 40pt">Reflexerado </h1>
<p id="control-webmode" style="font-size: 12pt; display: none">p1 (red): q,s (red),y - p2 (yellow): i,j (red),m</p>
<p style="font-size: 12pt; display: none">p1 (red): a,2 (red),c - p2 (yellow): i,k (red),#</p>
<p id="sound" style="font-size: 12pt; display: block">mute sound: z</p>
</div>
</body>
</html>