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
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -96,7 +96,7 @@ void setup() {
//sons
bgMusic = new SoundFile(this, "bgmusic.wav");
battle = new SoundFile(this, "battle.mp3");
battle = new SoundFile(this, "battle.wav");
droite1 = new SoundFile(this, "droite1.wav");
droite2 = new SoundFile(this, "droite2.wav");
droite3 = new SoundFile(this, "droite3.wav");
......@@ -109,15 +109,15 @@ void setup() {
epee1 = new SoundFile(this, "sching.wav");
epee2 = new SoundFile(this, "schyang.wav");
epee3 = new SoundFile(this, "sling.wav");
woosh = new SoundFile(this, "woosh.mp3");
clang1 = new SoundFile(this, "bangbang.mp3");
clang2 = new SoundFile(this, "pafpaf.mp3");
clang3 = new SoundFile(this, "bonk.mp3");
woosh = new SoundFile(this, "woosh.wav");
clang1 = new SoundFile(this, "bangbang.wav");
clang2 = new SoundFile(this, "pafpaf.wav");
clang3 = new SoundFile(this, "bonk.wav");
aie = new SoundFile(this, "aie.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");
gameover = new SoundFile(this, "gameover.mp3");
gameover = new SoundFile(this, "gameover.wav");
instructions = new SoundFile(this, "instructions.wav");
textFont(createFont("SansSerif", 30 * displayDensity));
......@@ -150,7 +150,7 @@ void slash(float a,float b,float c,float d,color col,float offset,float lastcomp
}
void fade(int n){
pg = createGraphics(displayWidth,displayHeight);
pg = createGraphics(displayWidth,displayHeight);
pg.beginDraw();
pg.background(0,0,0,n);
pg.endDraw();
......@@ -174,12 +174,15 @@ void draw() {
text("Instructions", startX+startSizeX/50, startY+startSizeY/3, startSizeX, startSizeY);
break;
case 1 : //Correspond au jeu en lui-même
if (bgMusic.isPlaying()){
bgMusic.stop();
}
if (!battle.isPlaying()){
battle.play();
}
if (bgMusic.isPlaying() || instructions.isPlaying()){
instructions.stop();
bgMusic.stop();
}
if (!battle.isPlaying()){
battle.play();
}
if (vie == 3){
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.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter