-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
345 lines (324 loc) · 13.2 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
<!DOCTYPE html>
<html>
<head>
<title>Hood Run</title>
<link rel="stylesheet" href="style.css">
<meta name="viewport" content="width = device-width, height = device-height">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Silkscreen&display=swap" rel="stylesheet">
<meta charset="utf-8">
<link rel="apple-touch-icon" sizes="180x180" href="fav/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="fav/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="fav/favicon-16x16.png">
<link rel="manifest" href="fav/site.webmanifest">
<script src="https://yandex.ru/games/sdk/v2"></script>
</head>
<body oncontextmenu="return false;">
<div id="turnLandscape">
rotate your device
<img style='margin-top: 30px' id='rotateIcon' src="assets/gui/orientation.png" alt="">
</div>
<main>
<div class="wrapper screenRatio">
<div class="loader">
<div></div>
<div></div>
<div></div>
<div></div>
</div>
<div class="controlBlock hide">
Controls
<img class='controlButton' src="assets/gui/W.png" alt="">
<div><img class='controlButton' src="assets/gui/A.png" alt="">
<img class='controlButton' src="assets/gui/S.png" alt="">
<img class='controlButton' src="assets/gui/D.png" alt="">
</div>
</div>
<canvas width="0" height="0" class="canvas" id="canvas">Ваш браузер не поддерживает JavaScript и HTML5!
</canvas>
<img class="pauseButton button hide" src="assets/gui/Pause.png" alt="" onclick="PauseToggle(); clickSound.play()">
<div class="score hide"></div>
<div class="coins hide">
<div class="coinsText"></div>
<img src="./assets/sprites/collect/coin.png" alt="">
</div>
<div class="leftButtonsBlock hide">
<img id="mobileLeftButton" ontouchstart="leftPressed = true; this.style.opacity = '0.5'"
ontouchend="leftPressed = false; this.style.opacity = '1'" class="mobileControlButt"
src="assets/gui/left.png" alt="">
<img id="mobileRightButton" ontouchstart="rightPressed = true; this.style.opacity = '0.5'"
ontouchend="rightPressed = false; this.style.opacity = '1'" class="mobileControlButt"
src="assets/gui/right.png" alt="">
</div>
<div class="rightButtonsBlock hide">
<img id="mobileUpButton" ontouchstart="jumpBegin(); this.style.opacity = '0.5'"
ontouchend="this.style.opacity = '1'" class="mobileControlButt" src="assets/gui/up.png" alt="">
<img id="mobileDownButton" ontouchstart="slideBegin(); this.style.opacity = '0.5'"
ontouchend="slideEnd(); this.style.opacity = '1'" class="mobileControlButt" src="assets/gui/down.png" alt="">
</div>
</div>
<div class="pause insideScreenRatio hide">
PAUSED
<div class="buttonHolder ">
<img class='replayButton button' src="assets/gui/Redo.png" alt="" onclick="Replay(); clickSound.play()">
<img class="playOnPauseButton button" src="assets/gui/Play.png" alt=""
onclick="PauseToggle(); clickSound.play()">
<img class='homeButton button' src="assets/gui/Home.png" alt="" onclick="GoToHome(); clickSound.play()">
</div>
</div>
<div class="gameOver insideScreenRatio hide">
<div class='HIandRecord'></div>
<div class="score gameOverScore"></div>
<div class="gameOverCoinsHolder">
<div class="gameOverCoins"></div>
<img class='payForLifeImg'src="assets/sprites/collect/coin.png" alt="">
</div>
<div class="saveMeHolder">
save me!
<div class="saveMeButtonsHolder">
<div class="payForLife smallBtn saveBtn" onclick="payForLife()">
100
<img class='payForLifeImg'src="assets/sprites/collect/coin.png" alt="">
</div>
<img class='smallBtn saveBtn' src="assets/gui/add.png" alt=""
onclick="showRevawardVideo(saveMe); clickSound.play()"><br>
</div>
</div>
<div class="buttonHolder">
<img class='homeButton button' src="assets/gui/Home.png" alt="" onclick="GoToHome(); clickSound.play()">
<img class='replayButton button' src="assets/gui/Redo.png" alt="" onclick="Replay(); clickSound.play()">
</div>
</div>
<div class="mainMenu mainBg hide screenRatio">
<div class="mainMenuSide">
<ul class="circles">
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
<div class='mainTitle'>
hood run
</div>
<div class="mainMenuButtons">
<div class='storeButton menuButton'
onclick="toggleHide(storeBlock); storeCoinsText.innerText = Number(mainCoinBlock.innerText); storeSound.play()">
<img src="assets/gui/cart.png" alt="">
store
</div>
<div class='playButton menuButton' onclick="PlayButtonActivate(); clickSound.play(); bgMusic.play(); ">
<img src="assets/gui/Play.png" alt="">
play
</div>
<div class='achivesButton menuButton' onclick="toggleHide(achivesBlock); clickSound.play()">
<img src="assets/gui/achives.png" alt="">
achives
</div>
</div>
<div class="mainLeftInfo">
<div class="mainLeftWrapper">
<img id='prizeImg' src="assets/gui/prize.png">
<div class='HighScoreBlock mainStatText'></div>
</div>
<div class="mainLeftWrapper">
<img id='coinImg' src="assets/sprites/collect/coin.png">
<div class='mainCoinsText mainStatText'></div>
</div>
</div>
<div class="rightTopBlock">
<img class='smallBtn soundBtn' onclick="mutePage(); clickSound.play()" alt="">
</div>
</div>
</div>
<div class="tutorial hide"></div>
<div class="achives mainBg screenRatio hide">
<div class="statsHolder">
<div class="stat" id="numberOfDeathsBlock"></div>
<div class='stat ' id="numberOfJumpsBlock"></div>
<div class='stat' id="numberOfslidesBlock"></div>
</div>
<div class="achivesHolder">
<div class="achiveBlock lock"><img class='achiveImg' src="assets/gui/pioneer.png" alt="">
<div class='achiveText'>
<p>Pioneer</p>
Score 100 points
</div>
</div>
<div class="achiveBlock lock"><img class='achiveImg' src="assets/gui/bomb.png" alt="">
<div class='achiveText'>
<p>Extreme</p>
Score 300 points
</div>
</div>
<div class="achiveBlock lock"><img class='achiveImg' src="assets/gui/motorbike.png" alt="">
<div class='achiveText'>
<p>Racer</p>
Score 500 points
</div>
</div>
<div class="achiveBlock lock"><img class='achiveImg' src="assets/gui/trees.png" alt="">
<div class='achiveText'>
<p>Run forest, run</p>
Score 750 points
</div>
</div>
<div class="achiveBlock lock"><img class='achiveImg' src="assets/gui/gigachad.png" alt="">
<div class='achiveText'>
<p>Gigachad</p>
Score 1000 points
</div>
</div>
<div class="achiveBlock lock"><img class='achiveImg' src="assets/gui/dead cat.png" alt="">
<div class='achiveText'>
<p>Puss in boots</p>
Die 8 times
</div>
</div>
<div class="achiveBlock lock"><img class='achiveImg' src="assets/gui/guitar.png" alt="">
<div class='achiveText'>
<p>Smells like Nirvana</p>
Die 27 times
</div>
</div>
<div class="achiveBlock lock"><img class='achiveImg' src="assets/gui/earth.png" alt="">
<div class='achiveText'>
<p>Main question</p>
Die 42 times
</div>
</div>
<div class="achiveBlock lock"><img class='achiveImg' src="assets/gui/skull.png" alt="">
<div class='achiveText'>
<p>Memento mori</p>
Die 100 times
</div>
</div>
<div class="achiveBlock lock"><img class='achiveImg' src="assets/gui/bouncer.png" alt="">
<div class='achiveText'>
<p>Bouncer</p>
Jump 500 times
</div>
</div>
<div class="achiveBlock lock"><img class='achiveImg' src="assets/gui/slide.png" alt="">
<div class='achiveText'>
<p>On the ground</p>
Slide under barriers 300 times
</div>
</div>
<div class="achiveBlock lock"><img class='achiveImg' src="assets/sprites/collect/shieldIcon.png" alt="">
<div class='achiveText'>
<p>S.H.I.E.L.D.</p>
Upgrade shield to max
</div>
</div>
<div class="achiveBlock lock"><img class='achiveImg' src="assets/sprites/collect/boosterIcon.png" alt="">
<div class='achiveText'>
<p>Flash</p>
Upgrade booster to max
</div>
</div>
<div class="achiveBlock lock"><img class='achiveImg' src="assets/sprites/collect/coin.png" alt="">
<div class='achiveText'>
<p>Uncle Pennybags</p>
Earn 1000 coins
</div>
</div>
<div class="achiveBlock lock"><img class='achiveImg' src="assets/gui/success.png" alt="">
<div class='achiveText'>
<p>All for one</p>
Unlock all achives
</div>
</div>
</div>
<div class="return-btn-holder">
<button class='btn return-btn' onclick="toggleHide(achivesBlock); clickSound.play()">
Return
</button>
</div>
</div>
<div class="store mainBg screenRatio hide">
<div class="storeHolder">
<div class="storeBack"></div>
<div class="storeCoins">
<div class="storeCoinsText"></div>
<img src="./assets/sprites/collect/coin.png" alt="">
</div>
<img class='addBtn' src="assets/gui/add.png" alt=""
onclick="showRevawardVideo(addCoins); clickSound.play()"><br>
<div class="upgradesWrapper">
<div class="upgrade">
<div class="shieldUpgradeHolder">
Shield
<div class="upgradeHolder">
<img src="assets/sprites/collect/shieldIcon.png" alt="">
<div class="upgradeProgress">
<div class="upgradeLevel shieldLevel"></div>
<div class="upgradeLevel shieldLevel"></div>
<div class="upgradeLevel shieldLevel"></div>
<div class="upgradeLevel shieldLevel"></div>
</div>
</div>
</div>
<div class="upgradeBtn smallBtn" onclick="Upgrade('shield')">
<div class="upgradeBtnContent">
<div class="shieldCost"></div>
<img src="assets/sprites/collect/coin.png" class="upgradeCoinImg" alt="">
</div>
</div>
</div>
<div class="upgrade">
<div class="boosterUpgradeHolder">
Booster
<div class="upgradeHolder">
<img src="assets/sprites/collect/boosterIcon.png" alt="">
<div class="upgradeProgress">
<div class="upgradeLevel boosterLevel"></div>
<div class="upgradeLevel boosterLevel"></div>
<div class="upgradeLevel boosterLevel"></div>
<div class="upgradeLevel boosterLevel"></div>
</div>
</div>
</div>
<div class="upgradeBtn smallBtn" onclick="Upgrade('booster')">
<div class="upgradeBtnContent">
<div class="boosterCost"></div>
<img src="assets/sprites/collect/coin.png" class="upgradeCoinImg" alt="">
</div>
</div>
</div>
</div>
</div>
<button class='btn return-btn store-return-btn' onclick="toggleHide(storeBlock); clickSound.play()">
Return
</button>
</main>
<audio controls>
<audio controls="controls">
<audio controls=""></audio>
<script>
var elem = document.querySelector('body');
function openFullscreen() {
if (elem.requestFullscreen) {
elem.requestFullscreen();
} else if (elem.webkitRequestFullscreen) { /* Safari */
elem.webkitRequestFullscreen();
} else if (elem.msRequestFullscreen) { /* IE11 */
elem.msRequestFullscreen();
}
}
</script>
<script src="scripts/howler.core.js"></script>
<script type="text/javascript" src="scripts/PxLoader.js"></script>
<script type="text/javascript" src="scripts/PxLoaderImage.js"></script>
<script type="text/javascript" src="scripts/yandexScripts.js"></script>
<script type="text/javascript" src="scripts/vars.js"></script>
<script type="text/javascript" src="scripts/loader.js"></script>
<script type="text/javascript" src="scripts/game.js"></script>
</body>
</html>