mirror of
https://github.com/hexahigh/games.git
synced 2025-12-11 20:15:38 +01:00
commit
740a80041b
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<audio loop autoplay>
|
||||
<audio id="music" loop autoplay>
|
||||
<source src="sound/Mekorama Mobile Official Theme Song.mp3" type="audio/mp3">
|
||||
</audio>
|
||||
<title>HTML5 Tetris</title>
|
||||
@ -11,8 +11,10 @@
|
||||
<audio id="clearsound" src="sound/pop.ogg" preload="auto"></audio>
|
||||
<canvas width='300' height='600'></canvas>
|
||||
<button id="playbutton" onclick="playButtonClicked();">Play</button>
|
||||
<button onclick="toggleMuted()">Mute|Unmute</button>
|
||||
<script src='js/tetris.js'></script>
|
||||
<script src='js/controller.js'></script>
|
||||
<script src='js/render.js'></script>
|
||||
<script src="js/music.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
4
Games/Tetris/js/music.js
Normal file
4
Games/Tetris/js/music.js
Normal file
@ -0,0 +1,4 @@
|
||||
function toggleMuted() {
|
||||
var sound = document.getElementById('music');
|
||||
sound.muted = !sound.muted;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user