update js

master
sundowndev 2017-12-09 04:29:13 +01:00
parent af10c05889
commit b78e30dedc
1 changed files with 5 additions and 2 deletions

View File

@ -133,6 +133,8 @@ setInterval(function(){
bulletY = 0; bulletY = 0;
setTimeout(function(){ setTimeout(function(){
bulletDestination.classList.remove('cible-touchee'); bulletDestination.classList.remove('cible-touchee');
bulletDestination.style.background = '';
bulletDestination.style.backgroundPosition = '';
}, 1000); }, 1000);
return; return;
} }
@ -212,8 +214,9 @@ var ntm = setInterval(function(){
emplacement = document.querySelector(".line-"+ciblex+" .col-"+cibley); emplacement = document.querySelector(".line-"+ciblex+" .col-"+cibley);
emplacement.classList.add('cible'); emplacement.classList.add('cible');
cibleValue = cibleValue + 1; cibleValue = cibleValue + 1;
if (cibleValue>=3){ if (cibleValue>=4){
alert("TAS PERDU"); // game over
console.log("TAS PERDU");
clearInterval(ntm); clearInterval(ntm);
} }
}, 1000); }, 1000);