Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
![]() |
2bb0642d0b | 3 years ago |
@ -0,0 +1,151 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import com.jfoenix.controls.JFXButton?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.image.Image?>
|
||||
<?import javafx.scene.image.ImageView?>
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.layout.Pane?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
|
||||
<AnchorPane prefHeight="500.0" prefWidth="800.0" style="-fx-background-color: White;">
|
||||
<children>
|
||||
<AnchorPane prefHeight="46.0" prefWidth="800.0" style="-fx-background-color: #002d40;">
|
||||
<children>
|
||||
<Label layoutX="7.0" layoutY="7.0">
|
||||
<graphic>
|
||||
<ImageView fitHeight="46.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true">
|
||||
<Image url="image/button/burger.png" />
|
||||
</ImageView>
|
||||
</graphic>
|
||||
</Label>
|
||||
<ImageView fitHeight="24.0" fitWidth="24.0" layoutX="762.0" layoutY="11.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@image/exit.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
<AnchorPane layoutY="46.0" prefHeight="454.0" prefWidth="44.0" style="-fx-background-color: white;">
|
||||
<children>
|
||||
<VBox alignment="TOP_CENTER" prefHeight="200.0" prefWidth="44.0" spacing="10.0" style="-fx-background-color: white;" AnchorPane.topAnchor="20.0">
|
||||
<children>
|
||||
<ImageView fitHeight="46.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@images/home.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
<ImageView fitHeight="46.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@images/add.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
<ImageView fitHeight="46.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@images/data.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
<ImageView fitHeight="46.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@images/user.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
<ImageView fitHeight="46.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@images/setting.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
<ImageView fitHeight="46.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@images/backup.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
<AnchorPane layoutX="44.0" layoutY="46.0" prefHeight="454.0" prefWidth="756.0" AnchorPane.bottomAnchor="0.0" AnchorPane.rightAnchor="0.0">
|
||||
<children>
|
||||
<Pane layoutY="21.0" prefHeight="454.0" prefWidth="756.0" style="-fx-background-color: #d9ecf2;" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
|
||||
</children>
|
||||
</AnchorPane>
|
||||
<AnchorPane prefHeight="200.0" prefWidth="200.0" style="-fx-background-color: #000;" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
|
||||
<AnchorPane prefHeight="454.0" prefWidth="178.0" style="-fx-background-color: White;" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="40.0">
|
||||
<children>
|
||||
<VBox prefHeight="200.0" prefWidth="100.0" spacing="5.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="20.0">
|
||||
<children>
|
||||
<JFXButton alignment="BASELINE_LEFT" buttonType="RAISED" prefHeight="38.0" prefWidth="179.0" text="Dashboard">
|
||||
<font>
|
||||
<Font size="16.0" />
|
||||
</font>
|
||||
</JFXButton>
|
||||
<JFXButton alignment="BASELINE_LEFT" buttonType="RAISED" layoutX="10.0" layoutY="10.0" prefHeight="38.0" prefWidth="179.0" text="Add New">
|
||||
<font>
|
||||
<Font size="16.0" />
|
||||
</font>
|
||||
</JFXButton>
|
||||
<JFXButton alignment="BASELINE_LEFT" buttonType="RAISED" layoutX="10.0" layoutY="58.0" prefHeight="38.0" prefWidth="179.0" text="Data">
|
||||
<font>
|
||||
<Font size="16.0" />
|
||||
</font>
|
||||
</JFXButton>
|
||||
<JFXButton alignment="BASELINE_LEFT" buttonType="RAISED" layoutX="10.0" layoutY="106.0" prefHeight="38.0" prefWidth="179.0" text="User">
|
||||
<font>
|
||||
<Font size="16.0" />
|
||||
</font>
|
||||
</JFXButton>
|
||||
<JFXButton alignment="BASELINE_LEFT" buttonType="RAISED" layoutX="10.0" layoutY="154.0" prefHeight="38.0" prefWidth="179.0" text="Setting">
|
||||
<font>
|
||||
<Font size="16.0" />
|
||||
</font>
|
||||
</JFXButton>
|
||||
<JFXButton alignment="BASELINE_LEFT" buttonType="RAISED" layoutX="10.0" layoutY="202.0" prefHeight="38.0" prefWidth="179.0" text="BackUp">
|
||||
<font>
|
||||
<Font size="16.0" />
|
||||
</font>
|
||||
</JFXButton>
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
<AnchorPane prefHeight="454.0" prefWidth="44.0" style="-fx-background-color: white;" AnchorPane.bottomAnchor="0.0">
|
||||
<children>
|
||||
<VBox alignment="TOP_CENTER" prefHeight="200.0" prefWidth="44.0" spacing="10.0" style="-fx-background-color: white;" AnchorPane.topAnchor="20.0">
|
||||
<children>
|
||||
<ImageView fitHeight="46.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="image/button/burger.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
<ImageView fitHeight="46.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@images/add.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
<ImageView fitHeight="46.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@images/data.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
<ImageView fitHeight="46.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@images/user.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
<ImageView fitHeight="46.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@images/setting.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
<ImageView fitHeight="46.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@images/backup.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</children>
|
||||
</AnchorPane>
|
@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import com.jfoenix.controls.JFXButton?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.SplitPane?>
|
||||
<?import javafx.scene.effect.Shadow?>
|
||||
<?import javafx.scene.image.Image?>
|
||||
<?import javafx.scene.image.ImageView?>
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.shape.Line?>
|
||||
<?import javafx.scene.shape.Rectangle?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
|
||||
<?import javafx.scene.control.Button?>
|
||||
<AnchorPane fx:controller="controller.GamePlayController" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="900.0" xmlns="http://javafx.com/javafx/11" xmlns:fx="http://javafx.com/fxml/1" >
|
||||
<children>
|
||||
<AnchorPane minHeight="300.0" minWidth="300.0" prefHeight="608.0" prefWidth="348.0" layoutX="600.0">
|
||||
<children>
|
||||
<Rectangle arcHeight="5.0" arcWidth="5.0" fill="#323436" height="608.0" layoutY="0.0" stroke="BLACK" strokeType="INSIDE" width="312.0" />
|
||||
<ImageView fitHeight="128.0" fitWidth="93.0" layoutX="29.0" layoutY="33.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@../image/personnage/Perso1.2.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
<Label layoutX="144.0" layoutY="59.0" prefHeight="41.0" prefWidth="124.0" text="Pseudonyme" textFill="WHITE">
|
||||
<font>
|
||||
<Font name="Segoe UI Black" size="16.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Rectangle arcHeight="5.0" arcWidth="5.0" height="331.0" layoutX="50.0" layoutY="166.0" opacity="0.3" stroke="BLACK" strokeDashOffset="10.0" strokeLineCap="ROUND" strokeLineJoin="ROUND" strokeMiterLimit="100.0" strokeType="INSIDE" strokeWidth="5.0" width="201.0" />
|
||||
<Line endX="100.0" layoutX="139.0" layoutY="222.0" startX="-77.0" stroke="#f2f0f0" />
|
||||
<Label alignment="CENTER" layoutX="88.0" layoutY="173.0" prefHeight="41.0" prefWidth="124.0" text="Action" textFill="WHITE">
|
||||
<font>
|
||||
<Font name="Segoe UI" size="16.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<JFXButton fx:id="buttonDe" onAction="#lancerDe" layoutX="95.0" layoutY="530.0" prefHeight="30.0" prefWidth="119.0" ripplerFill="#e1e1e1" style="-fx-background-color: #EB9C0A;" text="Lancer le dé" textAlignment="CENTER" textFill="WHITE">
|
||||
<font>
|
||||
<Font name="Segoe UI" size="15.0" />
|
||||
</font>
|
||||
<effect>
|
||||
<Shadow />
|
||||
</effect>
|
||||
</JFXButton>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</children>
|
||||
<ImageView fx:id="persoImageView" fitHeight="32.0" fitWidth="32.0" layoutX="132.0" layoutY="74.0" pickOnBounds="true"
|
||||
preserveRatio="true">
|
||||
</ImageView>
|
||||
</AnchorPane>
|
@ -1,39 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.Cursor?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.SplitPane?>
|
||||
<?import javafx.scene.effect.ImageInput?>
|
||||
<?import javafx.scene.image.Image?>
|
||||
<?import javafx.scene.image.ImageView?>
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.text.Text?>
|
||||
|
||||
<SplitPane dividerPositions="0.6635044642857143" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" style="-fx-background-color: #404040;" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/17">
|
||||
<items>
|
||||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="397.0" prefWidth="439.0">
|
||||
<children>
|
||||
<ImageView fitHeight="397.0" fitWidth="397.0" layoutX="-2.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@../terrain/map1.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</children></AnchorPane>
|
||||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="397.0" prefWidth="197.0" style="-fx-background-color: darkgray;">
|
||||
<children>
|
||||
<Button layoutX="59.0" layoutY="311.0" mnemonicParsing="false" text="Lancer le dé" />
|
||||
<Text layoutX="63.0" layoutY="155.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Tours :" />
|
||||
<ImageView fitHeight="67.0" fitWidth="62.0" layoutX="28.0" layoutY="69.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@Perso1.2.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</children>
|
||||
<effect>
|
||||
<ImageInput />
|
||||
</effect></AnchorPane>
|
||||
</items>
|
||||
<cursor>
|
||||
<Cursor fx:constant="DEFAULT" />
|
||||
</cursor>
|
||||
</SplitPane>
|
@ -1,40 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.image.Image?>
|
||||
<?import javafx.scene.image.ImageView?>
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.shape.Line?>
|
||||
<?import javafx.scene.shape.Rectangle?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
<?import javafx.scene.text.Text?>
|
||||
|
||||
|
||||
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="900.0" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1">
|
||||
<children>
|
||||
<ImageView fitHeight="600.0" fitWidth="600.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@terrain/map1.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
<Rectangle arcWidth="5.0" fill="#535353" height="614.0" layoutX="599.0" layoutY="-7.0" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="302.0" />
|
||||
<ImageView fitHeight="85.0" fitWidth="59.0" layoutX="625.0" layoutY="28.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@personnage/Perso1.2.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
<Text fill="WHITE" layoutX="712.0" layoutY="64.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Joueur 1">
|
||||
<font>
|
||||
<Font name="Segoe UI Black" size="19.0" />
|
||||
</font>
|
||||
</Text>
|
||||
<Button layoutX="711.0" layoutY="519.0" mnemonicParsing="false" style="-fx-background-color: #ffa20d;" text="Lancer le dé" textFill="WHITE" />
|
||||
<Rectangle arcHeight="20.0" arcWidth="20.0" height="342.0" layoutX="624.0" layoutY="149.0" opacity="0.21" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="252.0" />
|
||||
<Text fill="WHITE" layoutX="729.0" layoutY="180.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Action">
|
||||
<font>
|
||||
<Font size="15.0" />
|
||||
</font>
|
||||
</Text>
|
||||
<Line endX="74.33331298828125" endY="1.52587890625E-5" layoutX="763.0" layoutY="201.0" startX="-100.0" stroke="WHITE" />
|
||||
</children>
|
||||
</AnchorPane>
|
After Width: | Height: | Size: 1000 B |
After Width: | Height: | Size: 970 B |
After Width: | Height: | Size: 989 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 978 B After Width: | Height: | Size: 978 B |
Before Width: | Height: | Size: 970 B After Width: | Height: | Size: 970 B |
Before Width: | Height: | Size: 970 B After Width: | Height: | Size: 970 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1012 B After Width: | Height: | Size: 1012 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 955 B |
After Width: | Height: | Size: 910 B |
After Width: | Height: | Size: 927 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 2.6 KiB |
@ -1,40 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.image.Image?>
|
||||
<?import javafx.scene.image.ImageView?>
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.shape.Line?>
|
||||
<?import javafx.scene.shape.Rectangle?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
<?import javafx.scene.text.Text?>
|
||||
|
||||
|
||||
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="900.0" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1">
|
||||
<children>
|
||||
<ImageView fitHeight="600.0" fitWidth="600.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@terrain/map1.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
<Rectangle arcWidth="5.0" fill="#535353" height="614.0" layoutX="599.0" layoutY="-7.0" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="302.0" />
|
||||
<ImageView fitHeight="85.0" fitWidth="59.0" layoutX="625.0" layoutY="28.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@personnage/Perso1.2.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
<Text fill="WHITE" layoutX="712.0" layoutY="64.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Joueur 1">
|
||||
<font>
|
||||
<Font name="Segoe UI Black" size="19.0" />
|
||||
</font>
|
||||
</Text>
|
||||
<Button layoutX="711.0" layoutY="519.0" mnemonicParsing="false" style="-fx-background-color: #ffa20d;" text="Lancer le dé" textFill="WHITE" />
|
||||
<Rectangle arcHeight="20.0" arcWidth="20.0" height="342.0" layoutX="624.0" layoutY="149.0" opacity="0.21" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="252.0" />
|
||||
<Text fill="WHITE" layoutX="729.0" layoutY="180.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Action">
|
||||
<font>
|
||||
<Font size="15.0" />
|
||||
</font>
|
||||
</Text>
|
||||
<Line endX="74.33331298828125" endY="1.52587890625E-5" layoutX="763.0" layoutY="201.0" startX="-100.0" stroke="WHITE" />
|
||||
</children>
|
||||
</AnchorPane>
|
Before Width: | Height: | Size: 1000 B After Width: | Height: | Size: 1000 B |
Before Width: | Height: | Size: 970 B After Width: | Height: | Size: 970 B |
Before Width: | Height: | Size: 989 B After Width: | Height: | Size: 989 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 978 B After Width: | Height: | Size: 978 B |
Before Width: | Height: | Size: 970 B After Width: | Height: | Size: 970 B |
Before Width: | Height: | Size: 970 B After Width: | Height: | Size: 970 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1012 B After Width: | Height: | Size: 1012 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 955 B After Width: | Height: | Size: 955 B |
Before Width: | Height: | Size: 910 B After Width: | Height: | Size: 910 B |
Before Width: | Height: | Size: 927 B After Width: | Height: | Size: 927 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@ -0,0 +1,102 @@
|
||||
package controller;
|
||||
|
||||
import javafx.fxml.Initializable;
|
||||
import model.Case;
|
||||
import model.Map;
|
||||
|
||||
public class MapController implements Initializable {
|
||||
|
||||
public Map map;
|
||||
|
||||
@Override
|
||||
public void initialize(java.net.URL location, java.util.ResourceBundle resources) {
|
||||
|
||||
}
|
||||
|
||||
public void createMap(int difficulty) {
|
||||
if (difficulty == 1) {
|
||||
map = new Map(32,30);
|
||||
Case case1 = new Case(1,2,2, true, false,map);
|
||||
Case case2 = new Case(2,3,2, false, false,map);
|
||||
Case case3 = new Case(3,4,2, false, false,map);
|
||||
Case case4 = new Case(4,5,2, false, false,map);
|
||||
Case case5 = new Case(5,5,3, false, false,map);
|
||||
Case case6 = new Case(6,5,4, false, false,map);
|
||||
Case case7 = new Case(7,5,5, false, false,map);
|
||||
Case case8 = new Case(8,5,6, false, false,map);
|
||||
Case case9 = new Case(9,5,7, false, false,map);
|
||||
Case case10 = new Case(10,5,8, false, false,map);
|
||||
map.addCase(case1);
|
||||
map.addCase(case2);
|
||||
map.addCase(case3);
|
||||
map.addCase(case4);
|
||||
map.addCase(case5);
|
||||
map.addCase(case6);
|
||||
map.addCase(case7);
|
||||
map.addCase(case8);
|
||||
map.addCase(case9);
|
||||
map.addCase(case10);
|
||||
}
|
||||
if (difficulty == 2) {
|
||||
map = new Map(32,30);
|
||||
Case case1 = new Case(1,2,2, true, false,map);
|
||||
Case case2 = new Case(2,3,2, false, false,map);
|
||||
Case case3 = new Case(3,4,2, false, false,map);
|
||||
Case case4 = new Case(4,5,2, false, false,map);
|
||||
Case case5 = new Case(5,5,3, false, false,map);
|
||||
Case case6 = new Case(6,5,4, false, false,map);
|
||||
Case case7 = new Case(7,5,5, false, false,map);
|
||||
Case case8 = new Case(8,5,6, false, false,map);
|
||||
Case case9 = new Case(9,5,7, false, false,map);
|
||||
Case case10 = new Case(10,5,8, false, false,map);
|
||||
map.addCase(case1);
|
||||
map.addCase(case2);
|
||||
map.addCase(case3);
|
||||
map.addCase(case4);
|
||||
map.addCase(case5);
|
||||
map.addCase(case6);
|
||||
map.addCase(case7);
|
||||
map.addCase(case8);
|
||||
map.addCase(case9);
|
||||
map.addCase(case10);
|
||||
}
|
||||
if (difficulty == 3) {
|
||||
map = new Map(32,30);
|
||||
Case case1 = new Case(1,2,2, true, false,map);
|
||||
Case case2 = new Case(2,3,2, false, false,map);
|
||||
Case case3 = new Case(3,4,2, false, false,map);
|
||||
Case case4 = new Case(4,5,2, false, false,map);
|
||||
Case case5 = new Case(5,5,3, false, false,map);
|
||||
Case case6 = new Case(6,5,4, false, false,map);
|
||||
Case case7 = new Case(7,5,5, false, false,map);
|
||||
Case case8 = new Case(8,5,6, false, false,map);
|
||||
Case case9 = new Case(9,5,7, false, false,map);
|
||||
Case case10 = new Case(10,5,8, false, false,map);
|
||||
map.addCase(case1);
|
||||
map.addCase(case2);
|
||||
map.addCase(case3);
|
||||
map.addCase(case4);
|
||||
map.addCase(case5);
|
||||
map.addCase(case6);
|
||||
map.addCase(case7);
|
||||
map.addCase(case8);
|
||||
map.addCase(case9);
|
||||
map.addCase(case10);
|
||||
}
|
||||
if (difficulty != 1 && difficulty != 2 && difficulty != 3) {
|
||||
System.out.println("Difficulty not found");
|
||||
}
|
||||
}
|
||||
public Map getMap(){
|
||||
return map;
|
||||
}
|
||||
public Case getCaseStart(){
|
||||
return map.getStartCase();
|
||||
}
|
||||
public Case getNextCase(Case c){
|
||||
return map.getNextCase(c);
|
||||
}
|
||||
public Case getStartCase(){
|
||||
return map.getStartCase();
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package controller;
|
||||
|
||||
import model.Album;
|
||||
import model.Musique;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class MusiqueController {
|
||||
private Album song;
|
||||
|
||||
public void playMusique() throws InterruptedException {
|
||||
ArrayList<Musique> musiqueListe = new ArrayList<Musique>();
|
||||
Musique song1 = new Musique("/musique/medieval_musique1.mp3",211000);
|
||||
Musique song2 = new Musique("/musique/medieval_musique2.mp3",248000);
|
||||
Musique song3 = new Musique("/musique/medieval_musique3.mp3",248000);
|
||||
Musique song4 = new Musique("/musique/medieval_musique4.mp3",209000);
|
||||
song = new Album(musiqueListe);
|
||||
song.addList(song1);
|
||||
song.addList(song2);
|
||||
song.addList(song3);
|
||||
song.addList(song4);
|
||||
song.play();
|
||||
}
|
||||
|
||||
public void stopMusique() {
|
||||
song.stop();
|
||||
}
|
||||
}
|
@ -0,0 +1,234 @@
|
||||
package controller;
|
||||
|
||||
import javafx.animation.Animation;
|
||||
import javafx.animation.KeyFrame;
|
||||
import javafx.animation.Timeline;
|
||||
import javafx.animation.Transition;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.image.ImageView;
|
||||
import javafx.util.Duration;
|
||||
import model.Avatar;
|
||||
import model.Case;
|
||||
import model.Map;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
public class PageGameController implements Initializable {
|
||||
|
||||
@FXML
|
||||
private ImageView map;
|
||||
|
||||
@FXML
|
||||
private Button boutonDe;
|
||||
|
||||
@FXML
|
||||
private ImageView persoImageView;
|
||||
|
||||
PersoController persoController;
|
||||
Case caseActuelle;
|
||||
MapController mapController;
|
||||
Case caseAncienne;
|
||||
String pathPerso;
|
||||
Image imagePerso;
|
||||
|
||||
/*public void spawnPlayer(ImageView ImageView, int difficulty) {
|
||||
if(persoImageView != null) {
|
||||
System.out.println("persoImageView is null");
|
||||
}else {
|
||||
System.out.println("persoImageView is not null");
|
||||
}
|
||||
this.persoImageView = ImageView;
|
||||
persoController = new PersoController();
|
||||
persoController.createPerso(difficulty);
|
||||
mapController = persoController.getMapController();
|
||||
caseActuelle = mapController.getStartCase();
|
||||
pathPerso = persoController.getPath();
|
||||
imagePerso = new Image(getClass().getClassLoader().getResource(pathPerso+"2.png").toExternalForm());
|
||||
persoImageView.setLayoutY(persoController.getY());
|
||||
persoImageView.setLayoutX(persoController.getX());
|
||||
persoImageView.setFitHeight(32);
|
||||
persoImageView.setFitWidth(32);
|
||||
persoImageView.setImage(imagePerso);
|
||||
|
||||
}*/
|
||||
|
||||
public void movePlayerNextCase() throws InterruptedException {
|
||||
mapController = persoController.getMapController();
|
||||
Map map = persoController.getMap();
|
||||
caseAncienne = caseActuelle;
|
||||
caseActuelle = mapController.getNextCase(caseActuelle);
|
||||
Timeline timeline = new Timeline();
|
||||
timeline.setCycleCount(1);
|
||||
|
||||
//animation déplacement vers la droite
|
||||
if(caseActuelle.getCoordX() > caseAncienne.getCoordX()){
|
||||
Image imagePerso7 = new Image(getClass().getClassLoader().getResource(pathPerso+"7.png").toExternalForm());
|
||||
Image imagePerso8 = new Image(getClass().getClassLoader().getResource(pathPerso+"8.png").toExternalForm());
|
||||
Image imagePerso9 = new Image(getClass().getClassLoader().getResource(pathPerso+"9.png").toExternalForm());
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(200), event -> {
|
||||
persoImageView.setImage(imagePerso8);
|
||||
persoImageView.setLayoutX(persoImageView.getLayoutX()+4);
|
||||
}));
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(300), event -> {
|
||||
persoImageView.setImage(imagePerso7);
|
||||
persoImageView.setLayoutX(persoImageView.getLayoutX()+4);
|
||||
}));
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(400), event -> {
|
||||
persoImageView.setImage(imagePerso9);
|
||||
persoImageView.setLayoutX(persoImageView.getLayoutX()+4);
|
||||
}));
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(500), event -> {
|
||||
persoImageView.setImage(imagePerso7);
|
||||
persoImageView.setLayoutX(persoImageView.getLayoutX()+4);
|
||||
}));
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(600), event -> {
|
||||
persoImageView.setImage(imagePerso9);
|
||||
persoImageView.setLayoutX(persoImageView.getLayoutX()+4);
|
||||
}));
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(700), event -> {
|
||||
persoImageView.setImage(imagePerso7);
|
||||
persoImageView.setLayoutX(persoImageView.getLayoutX()+4);
|
||||
}));
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(800), event -> {
|
||||
persoImageView.setImage(imagePerso9);
|
||||
persoImageView.setLayoutX(persoImageView.getLayoutX()+4);
|
||||
}));
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(900), event -> {
|
||||
persoImageView.setImage(imagePerso8);
|
||||
persoImageView.setLayoutX(persoImageView.getLayoutX()+4);
|
||||
}));
|
||||
timeline.play();
|
||||
}
|
||||
//animation déplacement vers la gauche
|
||||
if(caseActuelle.getCoordX() < caseAncienne.getCoordX()){
|
||||
Image imagePerso4 = new Image(getClass().getClassLoader().getResource(pathPerso+"4.png").toExternalForm());
|
||||
Image imagePerso5 = new Image(getClass().getClassLoader().getResource(pathPerso+"5.png").toExternalForm());
|
||||
Image imagePerso6 = new Image(getClass().getClassLoader().getResource(pathPerso+"6.png").toExternalForm());
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(200), event -> {
|
||||
persoImageView.setImage(imagePerso5);
|
||||
persoImageView.setLayoutX(persoImageView.getLayoutX()+4);
|
||||
}));
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(300), event -> {
|
||||
persoImageView.setImage(imagePerso4);
|
||||
persoImageView.setLayoutX(persoImageView.getLayoutX()+4);
|
||||
}));
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(400), event -> {
|
||||
persoImageView.setImage(imagePerso6);
|
||||
persoImageView.setLayoutX(persoImageView.getLayoutX()+4);
|
||||
}));
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(500), event -> {
|
||||
persoImageView.setImage(imagePerso4);
|
||||
persoImageView.setLayoutX(persoImageView.getLayoutX()+4);
|
||||
}));
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(600), event -> {
|
||||
persoImageView.setImage(imagePerso6);
|
||||
persoImageView.setLayoutX(persoImageView.getLayoutX()+4);
|
||||
}));
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(700), event -> {
|
||||
persoImageView.setImage(imagePerso4);
|
||||
persoImageView.setLayoutX(persoImageView.getLayoutX()+4);
|
||||
}));
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(800), event -> {
|
||||
persoImageView.setImage(imagePerso6);
|
||||
persoImageView.setLayoutX(persoImageView.getLayoutX()+4);
|
||||
}));
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(900), event -> {
|
||||
persoImageView.setImage(imagePerso5);
|
||||
persoImageView.setLayoutX(persoImageView.getLayoutX()+4);
|
||||
}));
|
||||
timeline.play();
|
||||
}
|
||||
//animation déplacement vers le haut
|
||||
if(caseActuelle.getCoordY() < caseAncienne.getCoordY()){
|
||||
Image imagePerso10 = new Image(getClass().getClassLoader().getResource(pathPerso+"10.png").toExternalForm());
|
||||
Image imagePerso11 = new Image(getClass().getClassLoader().getResource(pathPerso+"11.png").toExternalForm());
|
||||
Image imagePerso12 = new Image(getClass().getClassLoader().getResource(pathPerso+"12.png").toExternalForm());
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(200), event -> {
|
||||
persoImageView.setImage(imagePerso11);
|
||||
persoImageView.setLayoutY(persoImageView.getLayoutY()+4);
|
||||
}));
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(300), event -> {
|
||||
persoImageView.setImage(imagePerso10);
|
||||
persoImageView.setLayoutY(persoImageView.getLayoutY()+4);
|
||||
}));
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(400), event -> {
|
||||
persoImageView.setImage(imagePerso12);
|
||||
persoImageView.setLayoutY(persoImageView.getLayoutY()+4);
|
||||
}));
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(500), event -> {
|
||||
persoImageView.setImage(imagePerso10);
|
||||
persoImageView.setLayoutY(persoImageView.getLayoutY()+4);
|
||||
}));
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(600), event -> {
|
||||
persoImageView.setImage(imagePerso12);
|
||||
persoImageView.setLayoutY(persoImageView.getLayoutY()+4);
|
||||
}));
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(700), event -> {
|
||||
persoImageView.setImage(imagePerso10);
|
||||
persoImageView.setLayoutY(persoImageView.getLayoutY()+4);
|
||||
}));
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(800), event -> {
|
||||
persoImageView.setImage(imagePerso12);
|
||||
persoImageView.setLayoutY(persoImageView.getLayoutY()+4);
|
||||
}));
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(900), event -> {
|
||||
persoImageView.setImage(imagePerso11);
|
||||
persoImageView.setLayoutY(persoImageView.getLayoutY()+4);
|
||||
}));
|
||||
timeline.play();
|
||||
}
|
||||
//animation déplacement vers le bas
|
||||
if(caseActuelle.getCoordY() > caseAncienne.getCoordY()){
|
||||
Image imagePerso1 = new Image(getClass().getClassLoader().getResource(pathPerso+"1.png").toExternalForm());
|
||||
Image imagePerso2 = new Image(getClass().getClassLoader().getResource(pathPerso+"2.png").toExternalForm());
|
||||
Image imagePerso3 = new Image(getClass().getClassLoader().getResource(pathPerso+"3.png").toExternalForm());
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(200), event -> {
|
||||
persoImageView.setImage(imagePerso2);
|
||||
persoImageView.setLayoutY(persoImageView.getLayoutY()+4);
|
||||
}));
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(300), event -> {
|
||||
persoImageView.setImage(imagePerso1);
|
||||
persoImageView.setLayoutY(persoImageView.getLayoutY()+4);
|
||||
}));
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(400), event -> {
|
||||
persoImageView.setImage(imagePerso3);
|
||||
persoImageView.setLayoutY(persoImageView.getLayoutY()+4);
|
||||
}));
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(500), event -> {
|
||||
persoImageView.setImage(imagePerso1);
|
||||
persoImageView.setLayoutY(persoImageView.getLayoutY()+4);
|
||||
}));
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(600), event -> {
|
||||
persoImageView.setImage(imagePerso3);
|
||||
persoImageView.setLayoutY(persoImageView.getLayoutY()+4);
|
||||
}));
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(700), event -> {
|
||||
persoImageView.setImage(imagePerso1);
|
||||
persoImageView.setLayoutY(persoImageView.getLayoutY()+4);
|
||||
}));
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(800), event -> {
|
||||
persoImageView.setImage(imagePerso3);
|
||||
persoImageView.setLayoutY(persoImageView.getLayoutY()+4);
|
||||
}));
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(900), event -> {
|
||||
persoImageView.setImage(imagePerso2);
|
||||
persoImageView.setLayoutY(persoImageView.getLayoutY()+4);
|
||||
}));
|
||||
timeline.play();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialize(URL url, ResourceBundle resourceBundle) {
|
||||
}
|
||||
|
||||
public void lancerDe(ActionEvent actionEvent) throws InterruptedException {
|
||||
movePlayerNextCase();
|
||||
System.out.println("lancer de");
|
||||
}
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package controller;
|
||||
|
||||
import model.Avatar;
|
||||
import model.Map;
|
||||
|
||||
public class PersoController {
|
||||
Avatar avatar;
|
||||
MapController mc;
|
||||
Map map;
|
||||
|
||||
public void createPerso(int difficulty, int perso) {
|
||||
mc = new MapController();
|
||||
mc.createMap(difficulty);
|
||||
map = mc.getMap();
|
||||
if (perso == 1) {
|
||||
avatar = new Avatar(1, "image/personnage/Perso1.");
|
||||
System.out.println("Perso 1");
|
||||
}
|
||||
if(perso == 2){
|
||||
avatar = new Avatar(2, "image/personnage/Perso2.");
|
||||
System.out.println("Perso 2");
|
||||
}
|
||||
if(perso == 3){
|
||||
avatar = new Avatar(3, "image/personnage/Perso3.");
|
||||
System.out.println("Perso 3");
|
||||
}
|
||||
if(perso != 1 && perso != 2 && perso != 3){
|
||||
System.out.println("Perso non reconnu");
|
||||
}
|
||||
avatar.setCoord(map.getCoordStartX(), map.getCoordStartY());
|
||||
if(avatar == null){
|
||||
System.out.println("Erreur avatar");
|
||||
}else{
|
||||
System.out.println("Avatar créé");
|
||||
}
|
||||
}
|
||||
public Map getMap() {
|
||||
return map;
|
||||
}
|
||||
public MapController getMapController() {
|
||||
return mc;
|
||||
}
|
||||
public String getPath(){
|
||||
String path = avatar.getImage();
|
||||
return path;
|
||||
}
|
||||
public int getX(){
|
||||
return avatar.getCoordX();
|
||||
}
|
||||
public int getY(){
|
||||
return avatar.getCoordY();
|
||||
}
|
||||
}
|