generated from codersforcauses/beginner-2023S
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmaingamepage.html
160 lines (140 loc) · 5.28 KB
/
maingamepage.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles.css">
<title>The Game</title>
</head>
<body>
<div id="menu1" class="container">
<div class="menu">
<button id="start" class="btn-minecraft">Play</button>
<button id="leaderboard" class="btn-minecraft">Leaderboard</button>
<button id="instruction" class="btn-minecraft">How to Play</button>
</div>
<div class="menu-options">
<button class="btn-minecraft mute-button">Mute SFX</button>
<button class="btn-minecraft mute-button">Mute BGM</button>
</div>
</div>
<script src="globals.js"></script>
<script src="buttons.js"></script>
<script src="audio.js"></script>
<div id="game" class="gamecont hidden">
<p
id="scoreDisplay"
><span>Score:</span> <span id="scoreEl" style="display: none;">0</span></p>
<div>
<canvas></canvas>
</div>
<!--new exit button-->
<button id="exitButton" class="btn-minecraft">Exit</button>
</div>
<!-- Game over screen -->
<div id="gameOverScreen">
<p>Game Over</p>
<p>Score: <span id="scoreOver">0</span></p>
<p>Press Enter to restart</p>
</div>
<!-- Start screen -->
<div id="startScreen">
<p>Welcome to the Game!</p>
<p>Press Enter to start</p>
</div>
<!--new stuff below-->
<!-- Pause screen -->
<div id="pauseScreen">
<p>Game is Paused</p>
<p>Press Enter to Resume</p>
</div>
<!-- Boss warning screen-->
<div id="bossWarning" class="boss-warning hidden">
<p>Warning: Boss Incoming!</p>
</div>
<!-- Icon container -->
<div id="iconScoreContainer" class="icon-score-container hidden">
<div id="icon1">
<img src="./img/icon1.webp" alt="Icon 1" width="30" height="30">
<span id="icon1Count">0</span>
</div>
<div id="icon2">
<img src="./img/icon2.png" alt="Icon 2" width="30" height="30">
<span id="icon2Count">0</span>
</div>
<div id="icon3">
<img src="./img/icon3.webp" alt="Icon 3" width="30" height="30">
<span id="icon3Count">0</span>
</div>
<div id="icon4">
<img src="./img/icon4.webp" alt="Icon 4" width="30" height="30">
<span id="icon4Count">0</span>
</div>
</div>
<!--exit popup-->
<div id="popup" class="hidden">
<p>Are you sure you want to quit?</p>
<button id="yesButton" class="btn-minecraft">Yes</button>
<button id="noButton" class="btn-minecraft">No</button>
</div>
<!--Hearts-->
<div id="minecraftHeartsContainer" class="hidden">
<div class="minecraft-heart">
<img src="./img/mcheart.png" alt="Full Heart" width="30" height="30">
</div>
<div class="minecraft-heart">
<img src="./img/mcheart.png" alt="Full Heart" width="30" height="30">
</div>
<div class="minecraft-heart">
<img src="./img/mcheart.png" alt="Full Heart" width="30" height="30">
</div>
<div class="minecraft-heart">
<img src="./img/mcheart.png" alt="Full Heart" width="30" height="30">
</div>
<div class="minecraft-heart">
<img src="./img/mcheart.png" alt="Full Heart" width="30" height="30">
</div>
<div class="minecraft-heart">
<img src="./img/mcheart.png" alt="Full Heart" width="30" height="30">
</div>
<div class="minecraft-heart">
<img src="./img/mcheart.png" alt="Full Heart" width="30" height="30">
</div>
<div class="minecraft-heart">
<img src="./img/mcheart.png" alt="Full Heart" width="30" height="30">
</div>
<div class="minecraft-heart">
<img src="./img/mcheart.png" alt="Full Heart" width="30" height="30">
</div>
<div class="minecraft-heart">
<img src="./img/mcheart.png" alt="Full Heart" width="30" height="30">
</div>
</div>
<audio id="bgm" src="./audio/BGM.mp3" loop></audio>
<audio id="clickSound" src="./audio/Click.mp3"></audio>
<audio id="GameOver" src="./audio/GameOver.mp3"></audio>
<audio id="Start" src="./audio/Start.mp3"></audio>
<audio id="Pause" src="./audio/Pause.wav"></audio>
<audio id="BossAlert1" src="./audio/Boss Alert 1.mp3"></audio>
<audio id="BossAlert2" src="./audio/Boss Alert 2.mp3"></audio>
<audio id="BossDie" src="./audio/BossDie.mp3"></audio>
<audio id="BossSpawn" src="./audio/BossSpawn.mp3"></audio>
<audio id="EnemyShoot" src="./audio/EnemyShoot.wav"></audio>
<audio id="Shoot" src="./audio/Shoot.mp3"></audio>
<audio id="EnemyDie" src="./audio/Pop.mp3"></audio>
<audio id="PlayerHit" src="./audio/PlayerHit.mp3"></audio>
<audio id="Flak" src="./audio/FlakCannon.wav"></audio>
<audio id="Reload" src="./audio/Reload.mp3"></audio>
<audio id="Overcharge" src="./audio/Overcharge.mp3"></audio>
<audio id="OverchargeCD" src="./audio/OverchargeCD.mp3"></audio>
<audio id="Shield" src="./audio/Shield.mp3"></audio>
<audio id="ShieldCD" src="./audio/ShieldCD.mp3"></audio>
<audio id="Heal" src="./audio/Heal.mp3"></audio>
<audio id="HealCD" src="./audio/HealCD.mp3"></audio>
<audio id="BossHit1" src="./audio/BossHit1.mp3"></audio>
<audio id="BossHit2" src="./audio/BossHit2.mp3"></audio>
<audio id="BossHit3" src="./audio/BossHit3.mp3"></audio>
<audio id="BossHit4" src="./audio/BossHit4.mp3"></audio>
<audio id="Boss5SFX" src="./audio/Boss5 SFX.mp3"></audio>
</body>
</html>