ajustement et ajout d'effets sonores

This commit is contained in:
Bastien NOEL
2020-05-04 16:15:01 +02:00
parent 8627870e86
commit 54e2ae4039
6 changed files with 43 additions and 19 deletions

View File

@@ -22,6 +22,7 @@ public class MenuController implements Initializable{
@FXML private AnchorPane rootPane;
@FXML private ImageView titre;
@Override
public void initialize(URL arg0, ResourceBundle arg1) {
InputStream input;
@@ -32,8 +33,9 @@ public class MenuController implements Initializable{
@FXML
public void commencerPartie(MouseEvent mouseEvent) throws IOException{
InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav");
EffetSonore.playSoundEffect("src//ihm//ressources//musique//BEEP1.wav");
EffetSonore.playSoundEffect(fileSound1);
System.out.println("Passage à l'écran de choix des joueurs");
final URL fxmlURL = getClass().getResource("/ihm/ressources/Choix_joueur.fxml");
@@ -49,7 +51,10 @@ public class MenuController implements Initializable{
}
public void afficherRegle(MouseEvent mouseEvent) {
EffetSonore.playSoundEffect("src//ihm//ressources//musique//BEEP1.wav");
InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav");
EffetSonore.playSoundEffect(fileSound1);
System.out.println("blaaaa");
}