Merge branch 'master' into 'engineWIP'

# Conflicts:
#   src/Main.java
This commit is contained in:
François Autin
2021-05-27 11:27:27 +00:00
4 changed files with 121 additions and 15 deletions

View File

@ -9,25 +9,15 @@
import engine.Engine;
import launcher.Launcher;
import javafx.application.Application;
public class Main {
// Interface de configuration et lancement
static Launcher launcher = new Launcher();
// Moteur de jeu
static Engine game = new Engine();
public static void main(String[] args) {
// Lancement de l'interface de configuration du Jeu
try {
launcher.launch();
} catch (Exception e) {
e.printStackTrace();
}
Application.launch(Launcher.class, args);
}
}

View File

@ -9,12 +9,26 @@
package launcher;
public class Launcher {
import java.io.FileInputStream;
public void launch() throws Exception {
import javafx.application.Application;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
import javafx.fxml.*;
public class Launcher extends Application {
public void start(Stage primaryStage) throws Exception {
FileInputStream r_launcher = new FileInputStream("ui/launcher.fxml");
FXMLLoader floader = new FXMLLoader();
Parent root = floader.load(r_launcher);
Scene main = root.getScene();
System.out.println("Hello world!");
primaryStage.setTitle("Boulevard Combattant");
primaryStage.setScene(main);
primaryStage.show();
}
}