correction bug choix des joueurs
This commit is contained in:
parent
1b3c4aa0ae
commit
19439fadfe
22
src/ihm/controller/FinDePartieControlleur.java
Normal file
22
src/ihm/controller/FinDePartieControlleur.java
Normal 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");
|
||||
}
|
||||
}
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
34
src/ihm/ressources/Fin_De_Partie.fxml
Normal file
34
src/ihm/ressources/Fin_De_Partie.fxml
Normal file
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.layout.Pane?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
<?import javafx.scene.text.Text?>
|
||||
|
||||
<Pane fx:id="rootPane" onMouseClicked="#slideVolumeMusique" prefHeight="595.0" prefWidth="758.0" styleClass="background" stylesheets="@style/menu.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.ParametreController">
|
||||
<children>
|
||||
<VBox alignment="TOP_CENTER" prefHeight="595.0" prefWidth="758.0">
|
||||
<children>
|
||||
<Label alignment="CENTER" contentDisplay="CENTER" prefWidth="346.0" styleClass="titre" text="FIN DE PARTIE">
|
||||
<font>
|
||||
<Font size="36.0" />
|
||||
</font>
|
||||
<padding>
|
||||
<Insets top="50.0" />
|
||||
</padding>
|
||||
</Label>
|
||||
<Label alignment="CENTER" contentDisplay="CENTER" prefHeight="54.0" prefWidth="386.0" styleClass="titre" text="La victoire appartient à:" textAlignment="CENTER">
|
||||
<font>
|
||||
<Font size="36.0" />
|
||||
</font>
|
||||
<VBox.margin>
|
||||
<Insets top="25.0" />
|
||||
</VBox.margin>
|
||||
</Label>
|
||||
<Text fx:id="TextWinner" strokeType="OUTSIDE" strokeWidth="0.0" styleClass="titre" text="(nom des gagnants" />
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
</Pane>
|
BIN
src/ihm/ressources/musique/cloche.wav
Normal file
BIN
src/ihm/ressources/musique/cloche.wav
Normal file
Binary file not shown.
@ -1,4 +1,5 @@
|
||||
package main;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@ -7,6 +8,7 @@ import java.util.Map;
|
||||
import carte.CarteEquipement;
|
||||
import carte.CarteLieu;
|
||||
import effet.Effet;
|
||||
import ihm.EffetSonore;
|
||||
import personnage.CartePersonnage;
|
||||
import personnage.Metamorphe;
|
||||
import personnage.CartePersonnage.Equipe;
|
||||
@ -91,6 +93,8 @@ public class Joueur {
|
||||
private void death() {
|
||||
this.deathState = true;
|
||||
this.plateau.death(this);
|
||||
InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/cloche.wav");
|
||||
EffetSonore.playSoundEffect(fileSound1);
|
||||
}
|
||||
|
||||
//pour tests IA
|
||||
|
Loading…
x
Reference in New Issue
Block a user