Skip to content
Extraits de code Groupes Projets
Valider 80a6e31a rédigé par Quentin LECOMTE's avatar Quentin LECOMTE
Parcourir les fichiers

Replace boucle_de_jeu.pde

parent 211c361c
Branches
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -96,7 +96,7 @@ void setup() { ...@@ -96,7 +96,7 @@ void setup() {
//sons //sons
bgMusic = new SoundFile(this, "bgmusic.wav"); bgMusic = new SoundFile(this, "bgmusic.wav");
battle = new SoundFile(this, "battle.mp3"); battle = new SoundFile(this, "battle.wav");
droite1 = new SoundFile(this, "droite1.wav"); droite1 = new SoundFile(this, "droite1.wav");
droite2 = new SoundFile(this, "droite2.wav"); droite2 = new SoundFile(this, "droite2.wav");
droite3 = new SoundFile(this, "droite3.wav"); droite3 = new SoundFile(this, "droite3.wav");
...@@ -109,15 +109,15 @@ void setup() { ...@@ -109,15 +109,15 @@ void setup() {
epee1 = new SoundFile(this, "sching.wav"); epee1 = new SoundFile(this, "sching.wav");
epee2 = new SoundFile(this, "schyang.wav"); epee2 = new SoundFile(this, "schyang.wav");
epee3 = new SoundFile(this, "sling.wav"); epee3 = new SoundFile(this, "sling.wav");
woosh = new SoundFile(this, "woosh.mp3"); woosh = new SoundFile(this, "woosh.wav");
clang1 = new SoundFile(this, "bangbang.mp3"); clang1 = new SoundFile(this, "bangbang.wav");
clang2 = new SoundFile(this, "pafpaf.mp3"); clang2 = new SoundFile(this, "pafpaf.wav");
clang3 = new SoundFile(this, "bonk.mp3"); clang3 = new SoundFile(this, "bonk.wav");
aie = new SoundFile(this, "aie.wav"); aie = new SoundFile(this, "aie.wav");
mort = new SoundFile(this, "mort.wav"); mort = new SoundFile(this, "mort.wav");
cri1 = new SoundFile(this, "cri.mp3"); cri1 = new SoundFile(this, "cri.wav");
cri2 = new SoundFile(this, "rale.wav"); cri2 = new SoundFile(this, "rale.wav");
gameover = new SoundFile(this, "gameover.mp3"); gameover = new SoundFile(this, "gameover.wav");
instructions = new SoundFile(this, "instructions.wav"); instructions = new SoundFile(this, "instructions.wav");
textFont(createFont("SansSerif", 30 * displayDensity)); textFont(createFont("SansSerif", 30 * displayDensity));
...@@ -174,12 +174,15 @@ void draw() { ...@@ -174,12 +174,15 @@ void draw() {
text("Instructions", startX+startSizeX/50, startY+startSizeY/3, startSizeX, startSizeY); text("Instructions", startX+startSizeX/50, startY+startSizeY/3, startSizeX, startSizeY);
break; break;
case 1 : //Correspond au jeu en lui-même case 1 : //Correspond au jeu en lui-même
if (bgMusic.isPlaying()){
if (bgMusic.isPlaying() || instructions.isPlaying()){
instructions.stop();
bgMusic.stop(); bgMusic.stop();
} }
if (!battle.isPlaying()){ if (!battle.isPlaying()){
battle.play(); battle.play();
} }
if (vie == 3){ if (vie == 3){
image(troiscoeur, 0, 0, displayWidth, troiscoeur.height * (displayWidth/troiscoeur.width)); image(troiscoeur, 0, 0, displayWidth, troiscoeur.height * (displayWidth/troiscoeur.width));
} }
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter