ajout du mode survie

inclusion-bdd
adplantade 5 years ago
parent c0d2eea638
commit d24a76d3ad

@ -99,5 +99,5 @@
padding: 10px; padding: 10px;
font-size: large; font-size: large;
font-weight: bold; font-weight: bold;
font-family: augie; font-family: 'Segoe print';
} }

@ -27,6 +27,13 @@ if (get['mode'].includes('p'))
} }
else if(get['mode'].includes('m')) else if(get['mode'].includes('m'))
{ {
objPts=null;
tpsRem=[0,parseInt(get['mode'].substring(0,get['mode'].length-1),10),0]; tpsRem=[0,parseInt(get['mode'].substring(0,get['mode'].length-1),10),0];
document.getElementById("chronotime").style.display="none"; document.getElementById("chronotime").style.display="none";
} }
else if(get['mode']=="surv")
{
objPts=null;
tpsRem=[0,1,0];
document.getElementById("chronotime").style.display="none";
}

@ -25,3 +25,8 @@ var x = setInterval(function() {
window.location.replace("./score.html?pts="+points); window.location.replace("./score.html?pts="+points);
} }
}, 1000); }, 1000);
function addTime(secs)
{
fin.setSeconds(fin.getSeconds()+secs);
}

@ -412,11 +412,15 @@ var canvasT = document.getElementById('canvasTotal');
points+=modif; points+=modif;
document.getElementById("stats").innerHTML = points+" points"; document.getElementById("stats").innerHTML = points+" points";
if(points==objPts) if(objPts!=null && points==objPts)
{ {
chronoStop(); chronoStop();
window.location.replace("./score.html?pts="+document.getElementById("chronotime").innerHTML); window.location.replace("./score.html?pts="+document.getElementById("chronotime").innerHTML);
} }
else if(get['mode']=="surv")
{
addTime(30);
}
} }
function changeOrder(from, to) function changeOrder(from, to)

Loading…
Cancel
Save