@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="DiscordProjectSettings">
|
||||||
|
<option name="show" value="PROJECT" />
|
||||||
|
<option name="description" value="" />
|
||||||
|
</component>
|
||||||
|
</project>
|
@ -1,5 +1,4 @@
|
|||||||
|
|
||||||
#player{
|
#player{
|
||||||
-fx-text-fill: #ffffff;
|
-fx-text-fill: #ffffff;
|
||||||
|
|
||||||
}
|
}
|
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 295 B |
After Width: | Height: | Size: 675 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 862 B |
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 1.6 MiB |
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.3 KiB |
@ -1,21 +1,55 @@
|
|||||||
package launcher;
|
package launcher;
|
||||||
|
|
||||||
import model.Avatar;
|
import javafx.application.Application;
|
||||||
import model.Case;
|
import javafx.fxml.FXMLLoader;
|
||||||
|
import javafx.scene.Parent;
|
||||||
public class Main {
|
import javafx.scene.Scene;
|
||||||
public static void Main (String[] args) {
|
import javafx.stage.Stage;
|
||||||
Case depart = new Case(1,10,10,true,false);
|
import model.Database;
|
||||||
Avatar avatar1 = new Avatar(1,"Perso1.1.png",0,0);
|
|
||||||
int xdepart = depart.getCoordX();
|
import java.io.*;
|
||||||
avatar1.setCoordX(xdepart);
|
import java.util.Objects;
|
||||||
int ydepart = depart.getCoordY();
|
|
||||||
avatar1.setCoordY(ydepart);
|
public class Main extends Application {
|
||||||
int xavatar1 = avatar1.getCoordX();
|
|
||||||
int yavatar1 = avatar1.getCoordY();
|
private static Database currentd;
|
||||||
System.out.println("xavatar1 = " + xavatar1);
|
|
||||||
System.out.println("yavatar1 = " + yavatar1);
|
@Override
|
||||||
System.out.println("xdepart = " + xdepart);
|
public void start(Stage primaryStage) throws Exception{
|
||||||
System.out.println("ydepart = " + ydepart);
|
|
||||||
|
Parent root = FXMLLoader.load(Objects.requireNonNull(getClass().getResource("/fxml/ConfigurationMenu.fxml")));
|
||||||
|
primaryStage.setTitle("Hello World");
|
||||||
|
primaryStage.setScene(new Scene(root, 900, 600));
|
||||||
|
primaryStage.setResizable(false);
|
||||||
|
primaryStage.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static Database getDatabase(){
|
||||||
|
return currentd;
|
||||||
|
}
|
||||||
|
public static void serialize() throws IOException {
|
||||||
|
try (ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream("database.txt"))) {
|
||||||
|
out.writeObject(currentd);
|
||||||
|
} finally {
|
||||||
|
//System.out.println("Saved!");
|
||||||
|
System.exit(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static void deserialize() throws ClassNotFoundException, IOException{
|
||||||
|
ObjectInputStream in = null;
|
||||||
|
try {
|
||||||
|
in=new ObjectInputStream (new FileInputStream("database.txt"));
|
||||||
|
currentd=(Database) in.readObject();
|
||||||
|
in.close();
|
||||||
|
}
|
||||||
|
catch (FileNotFoundException | NullPointerException e){
|
||||||
|
currentd=new Database();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
launch(args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,9 @@
|
|||||||
package sample;
|
package model;
|
||||||
|
|
||||||
import javafx.scene.layout.Pane;
|
import launcher.Main;
|
||||||
|
|
||||||
import java.io.FileOutputStream;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.ObjectOutputStream;
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.text.DateFormat;
|
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
public class DataTable implements Serializable {
|
public class DataTable implements Serializable {
|
||||||
private static int id=0;
|
private static int id=0;
|
@ -1,4 +1,4 @@
|
|||||||
package sample;
|
package model;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<?import com.jfoenix.controls.JFXButton?>
|
||||||
|
<?import javafx.scene.control.*?>
|
||||||
|
<?import javafx.scene.effect.Shadow?>
|
||||||
|
<?import javafx.scene.image.Image?>
|
||||||
|
<?import javafx.scene.image.ImageView?>
|
||||||
|
<?import javafx.scene.layout.AnchorPane?>
|
||||||
|
<?import javafx.scene.paint.*?>
|
||||||
|
<?import javafx.scene.shape.Rectangle?>
|
||||||
|
<?import javafx.scene.text.*?>
|
||||||
|
<?import java.net.URL?>
|
||||||
|
|
||||||
|
<AnchorPane fx:id="levelRoot" xmlns:fx="http://javafx.com/fxml/1" id="pane" maxHeight="-Infinity" maxWidth="-Infinity"
|
||||||
|
minHeight="-Infinity"
|
||||||
|
minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0"
|
||||||
|
xmlns="http://javafx.com/javafx/11" fx:controller="controller.TopPlayerController">
|
||||||
|
<ImageView fitHeight="600.0" fitWidth="1300" layoutX="133.0" layoutY="150.0" pickOnBounds="true" preserveRatio="true"
|
||||||
|
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
|
||||||
|
AnchorPane.topAnchor="0.0">
|
||||||
|
<Image url="/image/plaine.gif"/>
|
||||||
|
</ImageView>
|
||||||
|
<Rectangle arcHeight="5.0" arcWidth="5.0" height="600.0" layoutX="50" opacity="0.42" stroke="BLACK"
|
||||||
|
strokeType="INSIDE" width="800.0"/>
|
||||||
|
</AnchorPane>
|