diff --git a/build/boucle_de_jeu/boucle_de_jeu.pde b/build/boucle_de_jeu/boucle_de_jeu.pde index fbb8467510571b17bec8af382da644e5bd75464f..29ccf58fc170c2475d517612ccdf43f6654721e4 100644 --- a/build/boucle_de_jeu/boucle_de_jeu.pde +++ b/build/boucle_de_jeu/boucle_de_jeu.pde @@ -179,6 +179,14 @@ void draw() { bgMusic.play(); } vie = 3; + score = 0; + max_combo = 0; + combo = 0; + init_cooldown = 3; + cooldown_ennemy = init_cooldown; + init_reaction = 3; + reaction = init_reaction; + ennemy_move = -1; stroke(0); fill(startColor); rect(startX, startY, startSizeX, startSizeY); @@ -374,31 +382,18 @@ void draw() { break; case 2 : //Correspond à la mort du joueur -<<<<<<< HEAD - if (score > highScore){ - highScore = score; - } - if (max_combo > highCombo){ - highCombo = max_combo; - } - leaderBoard[0] = str(highScore); - leaderBoard[1] = str(highCombo); - textFont(font); - fill(245,24,1); - text("Game Over",displayWidth/4.3,displayHeight/2); - fill(255,255,255,100); - rect(startX, startY, startSizeX, startSizeY); - fill(255,255,255,100); - rect(startX-displayWidth/20, startY2, startSizeX+displayWidth/10, startSizeY); - fill(0,0,0,100); - text("Retour menu", startX+startSizeX/20, startY+startSizeY/3, startSizeX, startSizeY); - text("Combo max : " + max_combo + "\nScore : " + score, startX, startY2+startSizeY/6, startSizeX+displayWidth/10, startSizeY); - break; -======= if (!gameoverhasplayed){ gameoverhasplayed = true; gameover.play(); } + if (score > highScore){ + highScore = score; + } + if (max_combo > highCombo){ + highCombo = max_combo; + } + leaderBoard[0] = str(highScore); + leaderBoard[1] = str(highCombo); textFont(font); fill(245,24,1); text("Game Over",displayWidth/4.3,displayHeight/2); @@ -410,8 +405,6 @@ void draw() { text("Retour menu", startX+startSizeX/20, startY+startSizeY/3, startSizeX, startSizeY); text("Combo max : " + max_combo + "\nScore : " + score, startX, startY2+startSizeY/6, startSizeX+displayWidth/10, startSizeY); break; ->>>>>>> 80a6e31a4a366f47a0b6c5c453da4a88822dcbb8 - } }