diff --git a/test/menu.pde b/test/menu.pde deleted file mode 100644 index 0132310765ef52b71a26e3b30df2e6348e44390c..0000000000000000000000000000000000000000 --- a/test/menu.pde +++ /dev/null @@ -1,91 +0,0 @@ -import processing.sound.*; - -int mode = 0; - -//int nbrSound; - -int startX, startY, startSizeX, startSizeY; -color startColor, startHighlight; -boolean startOver; -PImage img; -SoundFile files[][]; -void setup(){ - size(displayWidth, displayHeight); - - // création de la liste des sons et initialisation de ceux-ci. - /*files = new SoundFile[8][nbrSound]; - for(int i = 0; i<8 ; i++){ - for(int j = 0; j<3; j++){ - String name = "sound" + str(i) + str(j); - files[i][j] = new SoundFile(this, name); - } - } - */ - - //Image menu - startColor = color(255); - startHighlight = color(204); - - startSizeX = displayWidth * 3 / 4; - startSizeY = displayHeight/8; - startX = displayWidth/2-startSizeX/2; - startY = displayHeight * 3 / 4; - - - PImage img = new PImage(); - img = loadImage("menu.jpg"); - img.resize(displayWidth, displayHeight); - background(img); -} - -void playSound(int direction){ // direction = 0 => gauche ; puis on tourne dans le sens horaire. 8 directions au total - int i = int(random(0,3)); - files[direction][i].play(); -} - -float timeBetweenTwoEnemies(int enemyCounter){ - return 0; -} - -void score(int combo){ - -} - -void draw(){ - switch(mode){ - case 0 : //Correspond au menu de jeu - update(mouseX, mouseY); - if (startOver) { - fill(startHighlight); - } else { - fill(startColor); - } - stroke(0); - rect(startX, startY, startSizeX, startSizeY); - fill(0, 0, 0); - textSize(150); - text("Play", startX+startSizeX/3, startY+startSizeY/4, startSizeX, startSizeY); - break; - case 1 : //Correspond au jeu en lui-même - background(0); - break; - - case 2 : //Correspond à la mort du joueur - break; - } -} - -void mousePressed() { - if (startOver) { - mode = 1; - } -} - -void update(int x, int y) { - if (mouseX >= startX && mouseX <= x+startSizeX && - mouseY >= startY && mouseY <= y+startSizeY){ - startOver = true; - } else { - startOver = false; - } -}