From 9cfba3ff5e0c6818f24d095cf4805d1618b0274c Mon Sep 17 00:00:00 2001 From: adplantade Date: Mon, 10 Aug 2020 17:33:02 +0200 Subject: [PATCH] augmentation du retour quand on gagne --- code/game.css | 6 ++++++ code/vitraux.js | 13 ++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/code/game.css b/code/game.css index 92f083d..97fffcf 100644 --- a/code/game.css +++ b/code/game.css @@ -111,4 +111,10 @@ margin-block-end: 0px; margin-inline-start: 0px; margin-inline-end: 0px; + } + + .win { + -webkit-box-shadow:inset 0px 0px 0px 5px lime; + -moz-box-shadow:inset 0px 0px 0px 5px lime; + box-shadow:inset 0px 0px 0px 5px lime; } \ No newline at end of file diff --git a/code/vitraux.js b/code/vitraux.js index 484c0c1..8f1ae43 100644 --- a/code/vitraux.js +++ b/code/vitraux.js @@ -578,12 +578,23 @@ function handleScore(modif) { points+=modif; document.getElementById("stats").innerHTML = points+" points"; + for(var cpt=1;cpt<5;cpt++) + { + document.getElementById("canvas"+cpt).classList.add("win"); + } + + setTimeout(function() + { + for(var cpt=1;cpt<5;cpt++) + { + document.getElementById("canvas"+cpt).classList.remove("win"); + } + }, 1000); if(objPts!=null && points==objPts) { chronoStop(); var pts = diff.getSeconds()+ (diff.getMinutes()*60) + ((diff.getHours()-1)*3600); - //console.log("./score.php?pts="+pts+"&mode="+get['mode']+"&diff="+get['diff']+"&pseudo="+get['pseudo']); window.location.replace("./score.php?pts="+pts+"&mode="+get['mode']+"&diff="+get['diff']+"&pseudo="+get['pseudo']); } else if(get['mode']=="surv")