-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
88 lines (82 loc) · 3.49 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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width= device-width, initial-scale=1.0">
<link rel="stylesheet" href="lib/style.css">
<link rel="stylesheet" href="css/style.css">
<title>Cave Copter</title>
</head>
<body>
<lg></lg>
<div id="settings_menu" class="fixed-full settings-window">
<img src="ic/x.png" class="close" onclick="closeWin(settings_menu)">
<div class="center">
<div class="inputs">Sounds <input class="setts-check" id="soundToggle" checked="true" type="checkbox"></div>
<div class="inputs">Obstacles <input class="setts-check" id="obstToggle" checked="true" type="checkbox"></div>
<div class="inputs">Use Random Seeds <input class="setts-check" id="randWrldToggle" checked="true" type="checkbox"></div>
<div class="inputs">Exhaust Smoke <input class="setts-check" id="smokeToggle" checked="true" type="checkbox"></div>
<div class="inputs">More Thrust On Combo Taps<input class="setts-check" id="powerIncrToggle" checked="true" type="checkbox"></div>
<div class="inputs">Reset Easy Score <button onclick="resetScore('easy')">Reset</button></div>
<div class="inputs">Reset Medium Score <button onclick="resetScore('medium')">Reset</button></div>
<div class="inputs">Reset Hard Score <button onclick="resetScore('hard')">Reset</button></div>
<div class="inputs">Reset Best Score <button onclick="resetScore('best')">Reset</button></div>
<div class="inputs">Reset All Score <button onclick="resetScore('all')">Reset</button></div>
</div>
</div>
<div class="fixed-full home-window">
<h1>Cave Copter</h1>
<div class="menu">
<a onclick="initGame(Game_modes.easy)">Easy <label id="easyHS">0</label> </a>
<a onclick="initGame(Game_modes.medium)">Medium <label id="mediumHS">0</label> </a>
<a onclick="initGame(Game_modes.hard)">Hard <label id="hardHS">0</label> </a>
<a onclick="openWin(settings_menu,'flex')">Settings</a>
<p>Best score - <label id="bestHS">0</label></p><br>
<p>Tip: Tap on screen or press space bar</p>
</div>
<div class="social">
<a href="https://www.twitter.com/fbn776"><img src="ic/twitter.png"></a>
<a href="https://fbn776.github.io/"><img src="ic/home.png"></a>
<a href="https://github.com/fbn776"><img src="ic/github.png"></a>
</div>
<div class="watermark">fbn776</div>
</div>
<div class="fixed-full game-window">
<div class="message fixed-full flex">
<p id="msgElm">Hi!</p>
</div>
<img src="ic/pause.png" id="pause_btn" onclick="openPauseMenu()">
<div class="flex score">0</div>
<canvas id="main" class="fixed-full"></canvas>
<div class="pause-menu">
<div class="main">
<div class="HS-text flex">Score - <label id="pauseHS"> 0</label></div>
<div class="ic-cont flex">
<img src="ic/home.png" id="home_btn">
<img src="ic/restart.png" id="restart_btn">
<img src="ic/resume.png" id="resume_btn">
</div>
</div>
</div>
</div>
<script src="script/howler.min.js"></script>
<script src="lib/canvas.js"></script>
<script src="lib/vector.js"></script>
<script src="script/support.js"></script>
<script src="script/perlin.js"></script>
<script>
const lg = new Log(s("lg"))
</script>
<script src="script/classes.js"></script>
<script src="script/main.js"></script>
<script>
const settingsCheckBox = document.getElementsByClassName("setts-check");
for (let a of settingsCheckBox) {
const id = a.id;
a.checked = localStorage.getItem(id) == "false" ? false : true;
a.oninput = function() {
localStorage.setItem(this.id, this.checked);
}
};
</script>
</body>
</html>