-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDuckHunt.java
38 lines (30 loc) · 1 KB
/
DuckHunt.java
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
import javafx.application.Application;
import javafx.scene.image.Image;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class DuckHunt extends Application {
public static final double volume = 0.025;
public static final int scale = 3;
public static Stage stage;
public static TitleScreen titleScreen;
@Override
public void start(Stage primaryStage) {
stage = primaryStage;
primaryStage.setTitle("Duck Hunt");
primaryStage.getIcons().add(new Image("file:\\assets\\\\favicon\\\\1.png"));
primaryStage.setResizable(false);
StackPane root = new StackPane();
titleScreen = new TitleScreen(root);
primaryStage.setScene(titleScreen);
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
public static void reset() {
stage.setScene(titleScreen);
}
public static void hardReset() {
stage.setScene(new TitleScreen(new StackPane()));
}
}