Merge branch 'development' of https://github.com/PTE-SH/ShadowHunterGame into development
This commit is contained in:
commit
84d63bd9c6
@ -60,12 +60,11 @@ public class ChoisirEquipement implements Initializable{
|
|||||||
for (CarteEquipement ce : equipements) {
|
for (CarteEquipement ce : equipements) {
|
||||||
|
|
||||||
ImageView iv = new ImageView(PlateauController.getImageCarte(ce));
|
ImageView iv = new ImageView(PlateauController.getImageCarte(ce));
|
||||||
|
iv.setFitHeight(100);
|
||||||
hbox.getChildren().add(iv);
|
iv.setFitHeight(100);
|
||||||
|
|
||||||
iv.fitHeightProperty().bind(hbox.heightProperty());
|
|
||||||
//iv.fitWidthProperty().bind(scrollpane.widthProperty());
|
|
||||||
iv.setPreserveRatio(true);
|
iv.setPreserveRatio(true);
|
||||||
|
|
||||||
|
hbox.getChildren().add(iv);
|
||||||
iv.setOnMouseClicked(e -> {
|
iv.setOnMouseClicked(e -> {
|
||||||
equipementSelected = ce;
|
equipementSelected = ce;
|
||||||
GestionnaireJeu.notifyPlateau();
|
GestionnaireJeu.notifyPlateau();
|
||||||
|
@ -44,7 +44,6 @@ public class MenuController implements Initializable{
|
|||||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
||||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||||
AnchorPane pane = fxmlLoader.load();
|
AnchorPane pane = fxmlLoader.load();
|
||||||
rootPane.getChildren().setAll(pane);
|
|
||||||
Scene scene = new Scene(pane);
|
Scene scene = new Scene(pane);
|
||||||
Stage appStage = (Stage) ((Node) mouseEvent.getSource()).getScene().getWindow();
|
Stage appStage = (Stage) ((Node) mouseEvent.getSource()).getScene().getWindow();
|
||||||
appStage.setScene(scene);
|
appStage.setScene(scene);
|
||||||
|
@ -451,6 +451,7 @@ public void afficherEffet(Joueur j) throws IOException {
|
|||||||
|
|
||||||
public void updateVieJoueur(Joueur joueur, int damage) {
|
public void updateVieJoueur(Joueur joueur, int damage) {
|
||||||
JoueurIHM jIHM = getJoueurIHM(joueur);
|
JoueurIHM jIHM = getJoueurIHM(joueur);
|
||||||
|
jIHM.getZoneJoueur().getChildren().setAll();
|
||||||
jIHM.deplacerPionVie(damage);
|
jIHM.deplacerPionVie(damage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -514,15 +515,11 @@ public void afficherEffet(Joueur j) throws IOException {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
if(j instanceof JoueurVirtuel) {
|
if(j instanceof JoueurVirtuel) {
|
||||||
System.out.println("here");
|
|
||||||
Timeline timeline = new Timeline(new KeyFrame(Duration.millis(3000), ae -> {
|
Timeline timeline = new Timeline(new KeyFrame(Duration.millis(3000), ae -> {
|
||||||
GestionnaireJeu.notifyPlateau();
|
|
||||||
pu.getStage().hide();
|
pu.getStage().hide();
|
||||||
|
|
||||||
}));
|
}));
|
||||||
timeline.play();
|
timeline.play();
|
||||||
}
|
}
|
||||||
System.out.println("j is instance of "+j);
|
|
||||||
pu.display();
|
pu.display();
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -545,7 +542,7 @@ public void afficherEffet(Joueur j) throws IOException {
|
|||||||
VBox v= (VBox)a.getChildren().get(0);
|
VBox v= (VBox)a.getChildren().get(0);
|
||||||
AnchorPane b=(AnchorPane)s.getItems().get(1);
|
AnchorPane b=(AnchorPane)s.getItems().get(1);
|
||||||
ImageView i= (ImageView)b.getChildren().get(0);
|
ImageView i= (ImageView)b.getChildren().get(0);
|
||||||
|
|
||||||
v.setRotate(180);
|
v.setRotate(180);
|
||||||
i.setRotate(180);
|
i.setRotate(180);
|
||||||
s.setRotate(180);
|
s.setRotate(180);
|
||||||
|
@ -32,20 +32,20 @@ public class ControleurIA {
|
|||||||
int diff = jIA.getDifficulte();
|
int diff = jIA.getDifficulte();
|
||||||
switch (diff) {
|
switch (diff) {
|
||||||
case 1:
|
case 1:
|
||||||
if (res < 25)
|
if (res < 60)
|
||||||
return true;
|
return true;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (res < 50)
|
if (res < 80)
|
||||||
return true;
|
return true;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (res < 75)
|
if (res < 100)
|
||||||
return true;
|
return true;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
} else if (res < 10)
|
} else if (res < 30)
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -314,8 +314,7 @@ public class Plateau extends Thread{
|
|||||||
public boolean isPartieTerminee() {
|
public boolean isPartieTerminee() {
|
||||||
return this.getStat(PARTIE_FINIE) == 1;
|
return this.getStat(PARTIE_FINIE) == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void deplacer(Joueur currentJoueur) {
|
public void deplacer(Joueur currentJoueur) {
|
||||||
|
|
||||||
boolean attributed = false;
|
boolean attributed = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user