2024-12-02 20:51:28 +01:00
|
|
|
package fr.monkhanny.dorfromantik.enums;
|
|
|
|
|
2024-12-07 19:22:51 +01:00
|
|
|
/**
|
|
|
|
* Enumération représentant les différents effets sonores utilisés dans l'application.
|
|
|
|
* Chaque valeur de l'énumération correspond à un effet sonore spécifique.
|
|
|
|
* Cette classe permet de récupérer le chemin d'accès au fichier sonore associé.
|
|
|
|
*
|
|
|
|
* @version 1.0
|
|
|
|
* @author Lenny FOULOU
|
|
|
|
*/
|
2024-12-02 20:51:28 +01:00
|
|
|
public enum Sounds {
|
2024-12-07 19:22:51 +01:00
|
|
|
/**
|
|
|
|
* Effet sonore 1.
|
|
|
|
*/
|
|
|
|
SOUNDS1,
|
2024-12-02 20:51:28 +01:00
|
|
|
|
2024-12-07 19:22:51 +01:00
|
|
|
/**
|
|
|
|
* Effet sonore 2.
|
|
|
|
*/
|
|
|
|
SOUNDS2;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Récupère le chemin du fichier sonore correspondant à l'énumération.
|
|
|
|
*
|
|
|
|
* @return Le chemin du fichier sonore
|
|
|
|
*/
|
|
|
|
public String getSoundsPath() {
|
|
|
|
switch (this) {
|
|
|
|
case SOUNDS1:
|
|
|
|
return "./ressources/sounds/SFX/1.wav";
|
|
|
|
case SOUNDS2:
|
|
|
|
return "./ressources/sounds/SFX/2.wav";
|
|
|
|
default:
|
|
|
|
throw new IllegalArgumentException("Unexpected value: " + this);
|
|
|
|
}
|
2024-12-02 20:51:28 +01:00
|
|
|
}
|
2024-12-07 19:22:51 +01:00
|
|
|
}
|