correction bug choix des joueurs

This commit is contained in:
Bastien NOEL
2020-05-14 13:06:50 +02:00
parent 1b3c4aa0ae
commit 19439fadfe
7 changed files with 77 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
package ihm.controller;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Label;
import javafx.scene.layout.Pane;
public class FinDePartieControlleur implements Initializable {
@FXML private Pane rootPane;
@FXML private Label labelWinner;
@Override
public void initialize(URL arg0, ResourceBundle arg1) {
labelWinner.setText("ceci est un test d'affichage");
}
}

View File

@@ -1,11 +1,13 @@
package ihm.controller;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import carte.CarteEquipement;
import database.RessourceLoader;
import ihm.EffetSonore;
import ihm.ImageViewEquipement;
import javafx.application.Platform;
import javafx.scene.Node;
@@ -77,6 +79,10 @@ public class JoueurIHM {
}
private void actionReveler(Button btn) {
InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav");
EffetSonore.playSoundEffect(fileSound1);
ImageView iv = this.getCartePersonnage();
System.out.println(this.joueur.getCartePersonnage());
Image im = this.pc.getImageCarte(this.joueur.getCartePersonnage());
@@ -140,6 +146,9 @@ public class JoueurIHM {
private void utiliserCapacite() {
InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav");
EffetSonore.playSoundEffect(fileSound1);
AnchorPane save = getZoneJoueur();
joueur.utiliserCapacite();
Pane pane = null;

View File

@@ -66,6 +66,10 @@ public class MenuController implements Initializable{
}
@FXML
public void quitterLappli(MouseEvent mouseEvent) throws IOException{
InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav");
EffetSonore.playSoundEffect(fileSound1);
System.exit(0);
}

View File

@@ -239,9 +239,11 @@ public class PlayersController implements Initializable{
listeIaLv2.get(indice).setVisible(true);
listeIaLv3.get(indice).setVisible(true);
plus.get(indice).setDisable(true);
nbJoueursV++;
}else {
ia.get(indice).setVisible(false);
nbJoueursH++;
}
@@ -275,7 +277,8 @@ public class PlayersController implements Initializable{
nbJoueursH--;
}
ia.get(indice).setVisible(true);
plus.get(indice).setDisable(false);
listeIaLv1.get(indice).setVisible(false);
listeIaLv2.get(indice).setVisible(false);
listeIaLv3.get(indice).setVisible(false);