removed music
This commit is contained in:
parent
3e64d5633c
commit
401c0873af
4 changed files with 2 additions and 42 deletions
|
@ -65,15 +65,8 @@
|
|||
</p>
|
||||
</div>
|
||||
<div onClick="showHelp()" id="openSideBar"><i class="fa fa-info-circle fa-lg"></i><span id ='helpText'> <i class="fa fa-arrow-left"><b> Help</b></i></span></div>
|
||||
<audio id="intro">
|
||||
<source src="sounds/intro.ogg" type="audio/ogg">
|
||||
</audio >
|
||||
<audio id="loop" >
|
||||
<source src="sounds/loop.ogg" type="audio/ogg">
|
||||
</audio>
|
||||
<div id="overlay" class="faded"></div>
|
||||
<div id = 'pauseBtn'><i class="fa fa-pause fa-2x"></i></div>
|
||||
<div id = 'volumeBtn'><i class="fa fa-volume-up fa-2x"></i></div>
|
||||
<div id = 'restartBtn'><i class="fa fa-refresh fa-2x"></i></div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
10
js/input.js
10
js/input.js
|
@ -104,15 +104,7 @@ $(document).ready(function(){
|
|||
|
||||
return false;
|
||||
});
|
||||
$("#volumeBtn").on('touchstart mousedown', function() {
|
||||
if (toggleAudio()) {
|
||||
$("#volumeBtn").html('<i class="fa fa-volume-off fa-2x"></i>');
|
||||
} else {
|
||||
$("#volumeBtn").html('<i class="fa fa-volume-up fa-2x"></i>');
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#restartBtn").on('touchstart mousedown', function() {
|
||||
if (gameState==2 || gameState==1 || importing == 1) {
|
||||
init(1);
|
||||
|
|
18
js/main.js
18
js/main.js
|
@ -173,24 +173,6 @@ function hideUIElements() {
|
|||
$('#restartBtn').hide();
|
||||
$('#startBtn').hide();
|
||||
}
|
||||
function loadListeners(){
|
||||
document.getElementById('intro').play();
|
||||
document.getElementById('intro').addEventListener('ended', function(){
|
||||
this.pause();
|
||||
toggleAudio();
|
||||
}, false);
|
||||
document.getElementById('loop').addEventListener('ended', function(){
|
||||
this.currentTime = 0;
|
||||
this.play();
|
||||
}, false);
|
||||
|
||||
}
|
||||
function toggleAudio(){
|
||||
var loopAudio = document.getElementById("loop");
|
||||
if(loopAudio.paused) loopAudio.play();
|
||||
else loopAudio.pause()
|
||||
return loopAudio.paused
|
||||
}
|
||||
|
||||
function init(b) {
|
||||
if (b) {
|
||||
|
|
|
@ -59,14 +59,7 @@ button:focus {
|
|||
color:#000;
|
||||
cursor:pointer;
|
||||
}
|
||||
#volumeBtn {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
right: 4px;
|
||||
z-index: 3000;
|
||||
color:#000;
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
#pauseBtn {
|
||||
position: absolute;
|
||||
margin-bottom: 3px;
|
||||
|
|
Loading…
Reference in a new issue