-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
42 lines (35 loc) · 1.23 KB
/
Main.java
File metadata and controls
42 lines (35 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package finalProject;
import java.util.ArrayList;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class Main extends Application {
public static Stage currentStage;
public static Scene menuScene;
public static Scene levelMenuScene;
public static ArrayList<Integer> scores = new ArrayList<Integer>();
public static ArrayList<Integer> stars = new ArrayList<Integer>();
public static ArrayList<Boolean> open = new ArrayList<Boolean>();
public static boolean firstOpen = false;
@Override
public void start(Stage primaryStage) throws Exception{
for (int i = 0; i < 2; i++) {
scores.add(0);
stars.add(0);
open.add(false);
}
open.set(0, true);
currentStage = primaryStage;
Parent root = FXMLLoader.load(getClass().getResource("menu.fxml"));
menuScene = new Scene(root);
// levelMenuScene = new Scene(FXMLLoader.load(getClass().getResource("levelMenu.fxml")));
primaryStage.setTitle("OverCooked!");
primaryStage.setScene(menuScene);
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}