ajouts listeners

This commit is contained in:
Vincent 2024-10-27 21:11:44 +01:00
parent bef0b378b5
commit 68e99b9cfc
81 changed files with 172 additions and 24 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
bin/java/view/img/D.png Normal file

Binary file not shown.

After

(image error) Size: 27 KiB

BIN
bin/java/view/img/bg.png Normal file

Binary file not shown.

After

(image error) Size: 322 KiB

BIN
bin/java/view/img/quit.png Normal file

Binary file not shown.

After

(image error) Size: 36 KiB

BIN
bin/lib/mariadb.jar Normal file

Binary file not shown.

BIN
bin/main/Main.class Normal file

Binary file not shown.

BIN
bin/model/Pocket.class Normal file

Binary file not shown.

BIN
bin/model/TerrainType.class Normal file

Binary file not shown.

BIN
bin/model/Tile.class Normal file

Binary file not shown.

Binary file not shown.

BIN
bin/view/App.class Normal file

Binary file not shown.

BIN
bin/view/BtnPerso.class Normal file

Binary file not shown.

Binary file not shown.

BIN
bin/view/GameView.class Normal file

Binary file not shown.

Binary file not shown.

BIN
bin/view/HexagonTile.class Normal file

Binary file not shown.

Binary file not shown.

BIN
bin/view/MenuView.class Normal file

Binary file not shown.

BIN
bin/view/ScoreView.class Normal file

Binary file not shown.

@ -1,21 +1,39 @@
package main;
import view.*;
import view.*;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.Clip;
import javax.swing.*;
import java.net.URL;
/**
* Classe principale du programme qui initialise l'interface utilisateur
* et joue un fichier audio en boucle.
*/
public class Main {
/**
* Point d'entrée du programme. Initialise l'interface utilisateur
* et démarre la lecture en boucle de la musique de fond.
*
* @param args les arguments de ligne de commande (non utilisés)
*/
public static void main(String[] args) {
SwingUtilities.invokeLater(() -> {
MenuView menuView = new MenuView();
App.addView(menuView, App.MENU_VIEW);
App.showView(App.MENU_VIEW);
String filepath = "/java/Music/audio.wav";
PlayMusic(filepath);
});
}
/**
* Joue un fichier audio en boucle.
*
* @param location le chemin d'accès au fichier audio à jouer
*/
public static void PlayMusic(String location) {
try {
URL url = Main.class.getResource(location);
@ -24,6 +42,7 @@ public class Main {
Clip clip = AudioSystem.getClip();
clip.open(audioInput);
clip.start();
clip.loop(Clip.LOOP_CONTINUOUSLY); // Boucle en continu
} else {
System.out.println("Fichier audio introuvable");
}

@ -107,6 +107,10 @@ java/controller/AllScore.class: java/controller/AllScore.java
### RÈGLE POUR COPIER LES IMAGES ###
Music:
mkdir -p classes/java/Music
if [ -d java/Music ]; then cp -r java/Music/* classes/java/Music/; else echo "Le répertoire java/Music n'existe pas."; fi
copy-images:
mkdir -p classes/java/view/img
if [ -d java/view/img ]; then cp -r java/view/img/* classes/java/view/img/; else echo "Le répertoire java/view/img n'existe pas."; fi
@ -119,7 +123,8 @@ $(MANIFEST_FILE):
### ARCHIVE JAR ###
Main.jar: Main.class copy-images $(MANIFEST_FILE)
Main.jar: Main.class copy-images Music $(MANIFEST_FILE)
mkdir -p classes/java/Music/
mkdir -p classes/java/view/img
jar cfm Main.jar $(MANIFEST_FILE) -C classes .
@ -131,9 +136,10 @@ run: Main.class copy-images
clean:
-rm -f classes/**/*.class
-rm -rf classes/java/view/img
-rm -rf classes/Music
### BUTS FACTICES ###
.PHONY: run clean copy-images
### FIN ###
### FIN ###

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More